public class Average extends Object implements AggregatorInstance<Double>
Modifier and Type | Method and Description |
---|---|
void |
accept(Object input)
Add the given value to the aggregator function
|
Number |
aggregateResult()
Retrieve the final result
|
Average |
createClone()
Create a clone of this aggregator, detaching from its result
|
Attribute |
getAttribute()
Get the attribute to pass to aggregator
|
public Average(Attribute<?> attribute)
attribute
- public Average createClone()
createClone
in interface AggregatorInstance<Double>
public void accept(Object input) throws AggregatorException
NOTE: Null values are ignored and not included in the computation
accept
in interface AggregatorInstance<Double>
input
- a single input valueAggregatorException
- if the function cannot be computed, possibly due to unsupported typespublic Number aggregateResult()
NOTE: null is returned if there was no input supplied to this function
aggregateResult
in interface AggregatorInstance<Double>
public Attribute getAttribute()
getAttribute
in interface AggregatorInstance<Double>
Copyright © 2003–2016 Terracotta, Inc.. All rights reserved.