Interface Aggregator.Accumulator

Enclosing interface:
Aggregator

public static interface Aggregator.Accumulator
Can accumulate multiple data items of a consistent type and yield an aggregate value corresponding to the set.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Combines the content of another compatible accumulator with the content of this one.
    Returns the aggregated value for the values accumulated so far.
    void
    submit(Object datum)
    Submits a value for accumulation.
  • Method Details

    • submit

      void submit(Object datum)
      Submits a value for accumulation.
      Parameters:
      datum - value to accumulate
    • getResult

      Object getResult()
      Returns the aggregated value for the values accumulated so far.
      Returns:
      accumulated result
    • add

      void add(Aggregator.Accumulator other)
      Combines the content of another compatible accumulator with the content of this one. The effect is as if all the data that have been accumulated into other were accumulated additionally into this one.
      Parameters:
      other - other compatible accumulator