Top Description Methods
net.sf.ehcache.search.aggregator

public Interface AggregatorInstance<T>

Known Direct Implementers
net.sf.ehcache.search.aggregator.Average, net.sf.ehcache.search.aggregator.Count, net.sf.ehcache.search.aggregator.Max, net.sf.ehcache.search.aggregator.Min, net.sf.ehcache.search.aggregator.Sum
Type Parameters
<T>
the runtime type of aggregation result
Imports
net.sf.ehcache.search.Attribute

An AggregatorInstance takes input objects and computes an aggregate function from them.
Author
Greg Luck

Method Summary

Modifier and TypeMethod and Description
public void
accept(Object
a single input value
input
)

Add the given value to the aggregator function

public Object

Returns:

aggregate result
aggregateResult
()

Retrieve the final result

public AggregatorInstance<T>
createClone()

Create a clone of this aggregator, detaching from its result

public Attribute<?>

Returns:

attribute to aggregate (null if no attribute is applicable to function)
getAttribute
()

Get the attribute to pass to aggregator

Method Detail

acceptback to summary
public void accept(Object input) throws AggregatorException

Add the given value to the aggregator function

Parameters
input:Object

a single input value

Exceptions
AggregatorException:
if the function cannot be computed, possibly due to unsupported types
aggregateResultback to summary
public Object aggregateResult()

Retrieve the final result

Returns:Object

aggregate result

createCloneback to summary
public AggregatorInstance<T> createClone()

Create a clone of this aggregator, detaching from its result

getAttributeback to summary
public Attribute<?> getAttribute()

Get the attribute to pass to aggregator

Returns:Attribute<?>

attribute to aggregate (null if no attribute is applicable to function)