Class AggregateFunctions.AggregateAverage
java.lang.Object
com.fluxtion.ext.streaming.api.group.AggregateFunctions.AggregateAverage
- All Implemented Interfaces:
NumericFunctionStateful
,NumericFunctionStateless
- Enclosing class:
- AggregateFunctions
public static class AggregateFunctions.AggregateAverage extends java.lang.Object implements NumericFunctionStateful
-
Constructor Summary
Constructors Constructor Description AggregateAverage()
-
Method Summary
Modifier and Type Method Description double
calcAverage(double newValue, double oldAverage)
double
reset()
A stateful function should be reset to initial state on receiving this call.
-
Constructor Details
-
AggregateAverage
public AggregateAverage()
-
-
Method Details
-
calcAverage
public double calcAverage(double newValue, double oldAverage) -
reset
public double reset()Description copied from interface:NumericFunctionStateful
A stateful function should be reset to initial state on receiving this call. For example an average calculation would zero all counts and sums.- Specified by:
reset
in interfaceNumericFunctionStateful
- Returns:
- the reset value for this calculation
-