public class AggregatorAvgBigDecimal extends Object implements AggregationMethod
Modifier and Type | Field and Description |
---|---|
protected long |
numDataPoints |
protected MathContext |
optionalMathContext |
protected BigDecimal |
sum |
Constructor and Description |
---|
AggregatorAvgBigDecimal(MathContext optionalMathContext)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear out the collection.
|
void |
enter(Object object)
Apply the value as entering aggregation (entering window).
|
BigDecimal |
getValue()
Returns the current value held.
|
void |
leave(Object object)
Apply the value as leaving aggregation (leaving window).
|
protected BigDecimal sum
protected long numDataPoints
protected MathContext optionalMathContext
public AggregatorAvgBigDecimal(MathContext optionalMathContext)
optionalMathContext
- math contextpublic void clear()
AggregationMethod
clear
in interface AggregationMethod
public void enter(Object object)
AggregationMethod
The value can be null since 'null' values may be counted as unique separate values.
enter
in interface AggregationMethod
object
- to add to aggregatepublic void leave(Object object)
AggregationMethod
The value can be null since 'null' values may be counted as unique separate values.
leave
in interface AggregationMethod
object
- to remove from aggregatepublic BigDecimal getValue()
AggregationMethod
getValue
in interface AggregationMethod