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

public Class Count

extends Object
implements AggregatorInstance<Integer>
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.search.aggregator.AggregatorInstance
Imports
net.sf.ehcache.search.Attribute

Counts the number of results
Author
Greg Luck

Field Summary

Modifier and TypeField and Description
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Implements net.sf.ehcache.search.aggregator.AggregatorInstance.accept.

Add the given value to the aggregator function
public Integer
public Count
createClone()

Implements net.sf.ehcache.search.aggregator.AggregatorInstance.createClone.

Create a clone of this aggregator, detaching from its result
public Attribute<?>
getAttribute()

Implements net.sf.ehcache.search.aggregator.AggregatorInstance.getAttribute.

Get the attribute to pass to aggregator
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
private int count

Constructor Detail

Countback to summary
public Count()

Method Detail

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

Implements net.sf.ehcache.search.aggregator.AggregatorInstance.accept.

Doc from net.sf.ehcache.search.aggregator.AggregatorInstance.accept.

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 Integer aggregateResult()

Implements net.sf.ehcache.search.aggregator.AggregatorInstance.aggregateResult.

Doc from net.sf.ehcache.search.aggregator.AggregatorInstance.aggregateResult.

Retrieve the final result

Returns:Integer

aggregate result

createCloneback to summary
public Count createClone()

Implements net.sf.ehcache.search.aggregator.AggregatorInstance.createClone.

Doc from net.sf.ehcache.search.aggregator.AggregatorInstance.createClone.

Create a clone of this aggregator, detaching from its result

getAttributeback to summary
public Attribute<?> getAttribute()

Implements net.sf.ehcache.search.aggregator.AggregatorInstance.getAttribute.

Doc from net.sf.ehcache.search.aggregator.AggregatorInstance.getAttribute.

Get the attribute to pass to aggregator

Returns:Attribute<?>

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