|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.search.aggregator.Average
public class Average
Compute the average (arithmetic mean) as a double
Constructor Summary | |
---|---|
Average(Attribute<?> attribute)
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Average(Attribute<?> attribute)
attribute
- Method Detail |
---|
public Average createClone()
createClone
in interface AggregatorInstance<Double>
public void accept(Object input) throws AggregatorException
accept
in interface AggregatorInstance<Double>
input
- a single input value
AggregatorException
- if the function cannot be computed, possibly due to unsupported typespublic Number aggregateResult()
aggregateResult
in interface AggregatorInstance<Double>
public Attribute getAttribute()
getAttribute
in interface AggregatorInstance<Double>
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |