Package uk.ac.starlink.ttools.task
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 TypeMethodDescriptionvoid
add
(Aggregator.Accumulator other) Combines the content of another compatible accumulator with the content of this one.Returns the aggregated value for the values accumulated so far.void
Submits a value for accumulation.
-
Method Details
-
submit
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
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 intoother
were accumulated additionally into this one.- Parameters:
other
- other compatible accumulator
-