Class Operators.LiftedFold<T,S>

java.lang.Object
eu.bandm.tools.util.Operators.LiftedFold<T,S>
All Implemented Interfaces:
Operators.Cons<Collection<T>,S>
Enclosing class:
Operators

static class Operators.LiftedFold<T,S> extends Object implements Operators.Cons<Collection<T>,S>
  • Field Details

  • Constructor Details

  • Method Details

    • consume

      public S consume(Collection<T> next, S state)
      Description copied from interface: Operators.Cons
      Compute a post-state from an input element and a pre-state. Computation should be stateless and thread-safe, i.e., f.consume(x, s) for a given fixed function object f, input element x and state s should not vary unless the observable state of x or s varies.
      Specified by:
      consume in interface Operators.Cons<T,S>
      Parameters:
      next - an input element.
      state - a pre-state.
      Returns:
      a post-state.
    • toString

      public String toString()
      Overrides:
      toString in class Object