-
- All Implemented Interfaces:
public final class MovingAverage<T extends Number>Keeps track of a moving average of the values added which fall within the given window size.
-
-
Constructor Summary
Constructors Constructor Description MovingAverage(Duration windowSize, Clock clock)MovingAverage(Duration windowSize)
-
Method Summary
-
-
Method Detail
-
get
@Synchronized() final Double get()
Get the average of the values currently contained within the sliding window.
-
add
@Synchronized() final Unit add(T value)
Add a value to this moving average
-
-
-
-