public class AggregatorNth extends Object implements AggregationMethod
Modifier and Type | Field and Description |
---|---|
protected Object[] |
circularBuffer |
protected int |
currentBufferElementPointer |
protected long |
numDataPoints |
protected int |
sizeBuf |
Constructor and Description |
---|
AggregatorNth(int sizeBuf)
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).
|
protected void |
enterValues(Object[] arr) |
Object[] |
getCircularBuffer() |
int |
getCurrentBufferElementPointer() |
long |
getNumDataPoints() |
int |
getSizeBuf() |
Object |
getValue()
Returns the current value held.
|
void |
leave(Object value)
Apply the value as leaving aggregation (leaving window).
|
void |
setCircularBuffer(Object[] circularBuffer) |
void |
setCurrentBufferElementPointer(int currentBufferElementPointer) |
void |
setNumDataPoints(long numDataPoints) |
protected final int sizeBuf
protected Object[] circularBuffer
protected int currentBufferElementPointer
protected long numDataPoints
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
public void clear()
AggregationMethod
clear
in interface AggregationMethod
protected void enterValues(Object[] arr)
public int getSizeBuf()
public Object[] getCircularBuffer()
public void setCircularBuffer(Object[] circularBuffer)
public int getCurrentBufferElementPointer()
public void setCurrentBufferElementPointer(int currentBufferElementPointer)
public long getNumDataPoints()
public void setNumDataPoints(long numDataPoints)