Class MeanAggregator
- java.lang.Object
-
- com.facebook.openwifi.rrm.aggregators.MeanAggregator
-
- All Implemented Interfaces:
Aggregator<Double>
public class MeanAggregator extends Object implements Aggregator<Double>
Tracks the mean of all added values. If no values are added, the mean is 0.
-
-
Constructor Summary
Constructors Constructor Description MeanAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(Double value)Addsvalueto the group of values being aggregated.DoublegetAggregate()Returns the aggregate measure of all added values.longgetCount()Returns the number of values that are aggregated.voidreset()Remove all added values from the group of values being aggregated.
-
-
-
Method Detail
-
addValue
public void addValue(Double value)
Description copied from interface:AggregatorAddsvalueto the group of values being aggregated.- Specified by:
addValuein interfaceAggregator<Double>
-
getAggregate
public Double getAggregate()
Description copied from interface:AggregatorReturns the aggregate measure of all added values.- Specified by:
getAggregatein interfaceAggregator<Double>
-
getCount
public long getCount()
Description copied from interface:AggregatorReturns the number of values that are aggregated.- Specified by:
getCountin interfaceAggregator<Double>
-
reset
public void reset()
Description copied from interface:AggregatorRemove all added values from the group of values being aggregated.- Specified by:
resetin interfaceAggregator<Double>
-
-