public class AggregatorNth extends java.lang.Object implements AggregationMethod
Constructor and Description |
---|
AggregatorNth(java.lang.Class returnType,
int sizeBuf)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear out the collection.
|
void |
enter(java.lang.Object value)
Apply the value as entering aggregation (entering window).
|
java.lang.Object |
getValue()
Returns the current value held.
|
java.lang.Class |
getValueType()
Returns the type of the current value.
|
void |
leave(java.lang.Object value)
Apply the value as leaving aggregation (leaving window).
|
public AggregatorNth(java.lang.Class returnType, int sizeBuf)
returnType
- return typesizeBuf
- sizepublic void enter(java.lang.Object value)
AggregationMethod
The value can be null since 'null' values may be counted as unique separate values.
enter
in interface AggregationMethod
value
- to add to aggregatepublic void leave(java.lang.Object value)
AggregationMethod
The value can be null since 'null' values may be counted as unique separate values.
leave
in interface AggregationMethod
value
- to remove from aggregatepublic java.lang.Class getValueType()
AggregationMethod
getValueType
in interface AggregationMethod
public java.lang.Object getValue()
AggregationMethod
getValue
in interface AggregationMethod
public void clear()
AggregationMethod
clear
in interface AggregationMethod