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

public Class Min<T>

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

Determine the minimum value
Author
teck

Field Summary

Modifier and TypeField and Description
private final Attribute<?>
private Comparable<T>

Constructor Summary

AccessConstructor and Description
public
Min(Attribute<?> attribute)

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

Note

null input values are ignored

public T
aggregateResult()

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

Retrieve the final result

Note

May return null if no input provided

public Min<T>
createClone()

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

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

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

Get the attribute to pass to aggregator
private static Comparable<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributeback to summary
private final Attribute<?> attribute
minback to summary
private Comparable<T> min

Constructor Detail

Minback to summary
public Min(Attribute<?> attribute)

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

Note

null input values are ignored

Parameters
input:Object

a single input value

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

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

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

Retrieve the final result

Note

May return null if no input provided

Returns:T

aggregate result

createCloneback to summary
public Min<T> 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<T> 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<T>

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

getComparableback to summary
private static Comparable<T> getComparable(Object o)