public class AggregatorDistinctValue extends Object implements AggregationMethod
Modifier and Type | Field and Description |
---|---|
protected AggregationMethod |
inner |
protected RefCountedSet<Object> |
valueSet |
Constructor and Description |
---|
AggregatorDistinctValue(AggregationMethod inner)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear out the collection.
|
void |
enter(Object value)
Apply the value as entering aggregation (entering window).
|
Object |
getValue()
Returns the current value held.
|
void |
leave(Object value)
Apply the value as leaving aggregation (leaving window).
|
protected final AggregationMethod inner
protected final RefCountedSet<Object> valueSet
public AggregatorDistinctValue(AggregationMethod inner)
inner
- is the aggregator function computing aggregation valuespublic void clear()
AggregationMethod
clear
in interface AggregationMethod
public void enter(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(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 Object getValue()
AggregationMethod
getValue
in interface AggregationMethod