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 void
addValue(Double value)
Addsvalue
to the group of values being aggregated.Double
getAggregate()
Returns the aggregate measure of all added values.long
getCount()
Returns the number of values that are aggregated.void
reset()
Remove all added values from the group of values being aggregated.
-
-
-
Method Detail
-
addValue
public void addValue(Double value)
Description copied from interface:Aggregator
Addsvalue
to the group of values being aggregated.- Specified by:
addValue
in interfaceAggregator<Double>
-
getAggregate
public Double getAggregate()
Description copied from interface:Aggregator
Returns the aggregate measure of all added values.- Specified by:
getAggregate
in interfaceAggregator<Double>
-
getCount
public long getCount()
Description copied from interface:Aggregator
Returns the number of values that are aggregated.- Specified by:
getCount
in interfaceAggregator<Double>
-
reset
public void reset()
Description copied from interface:Aggregator
Remove all added values from the group of values being aggregated.- Specified by:
reset
in interfaceAggregator<Double>
-
-