ehcache

net.sf.ehcache.search.aggregator
Class Min<T>

java.lang.Object
  extended by net.sf.ehcache.search.aggregator.Min<T>
Type Parameters:
T -
All Implemented Interfaces:
AggregatorInstance<T>

public class Min<T>
extends Object
implements AggregatorInstance<T>

Determine the minimum value

Author:
teck

Constructor Summary
Min(Attribute<?> attribute)
           
 
Method Summary
 void accept(Object input)
          Add the given value to the aggregator function
 T aggregateResult()
          Retrieve the final result
 Min<T> 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

Min

public Min(Attribute<?> attribute)
Parameters:
attribute -
Method Detail

createClone

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

Specified by:
createClone in interface AggregatorInstance<T>
Returns:

aggregateResult

public T aggregateResult()
Retrieve the final result

NOTE: May return null if no input provided

Specified by:
aggregateResult in interface AggregatorInstance<T>
Returns:
aggregate result

accept

public void accept(Object input)
            throws AggregatorException
Add the given value to the aggregator function

NOTE: null input values are ignored

Specified by:
accept in interface AggregatorInstance<T>
Parameters:
input - a single input value
Throws:
AggregatorException - if the function cannot be computed, possibly due to unsupported types

getAttribute

public Attribute getAttribute()
Get the attribute to pass to aggregator

Specified by:
getAttribute in interface AggregatorInstance<T>
Returns:
attribute to aggregate (null if no attribute is applicable to function)

ehcache

Copyright 2001-2015, Terracotta, Inc.