Class PickAnyAccumulator<T>

java.lang.Object
com.hazelcast.jet.accumulator.PickAnyAccumulator<T>
Type Parameters:
T -

public class PickAnyAccumulator<T> extends Object
Keeps the state needed to implement the AggregateOperations.pickAny() aggregate operation. It maintains the count of accumulated items so that it can properly set its value to null when all the items are deducted.
Since:
Jet 4.5
  • Constructor Details

    • PickAnyAccumulator

      public PickAnyAccumulator()
      Constructs an empty pickAny accumulator.
    • PickAnyAccumulator

      public PickAnyAccumulator(T value)
      Constructs a pickAny accumulator with the full state passed in the parameters.
      Parameters:
      value - the picked object
  • Method Details

    • accumulate

      public void accumulate(@Nullable T t)
      Accumulates an item.
    • combine

      public void combine(@Nonnull PickAnyAccumulator<T> other)
      Combines another accumulator with this one.
    • get

      public T get()
      Returns the picked object.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object