T
- type of data to aggregatepublic interface Aggregator<T> extends NullaryFunction<T>
evaluate()
function. This is the function at the core of the aggregator package as it
allows for a way to process the data series and get a result of the same type
out of this operation. Note that some aggregators will compute the data at
this point by iterating through the series of data previously stored (if any)
while others might prefer to compute this value on the fly, every time
add(Object)
is called. This interface doesn't make any assumption as
to when the aggregation result should be computed.Modifier and Type | Method and Description |
---|---|
void |
add(T data)
Adds data to the series which will be aggregated.
|
void |
reset()
Resets any series of data previously stored and returns the aggregator in
the initial state.
|
evaluate
void add(T data)
data
- Data to be added to the series which this aggregator will
process/aggregate.void reset()
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.