Package 

Class MovingAverage


  • 
    public final class MovingAverage<T extends Number>
    
                        

    Keeps track of a moving average of the values added which fall within the given window size.

    • Method Summary

      Modifier and Type Method Description
      final Double get() Get the average of the values currently contained within the sliding window.
      final Unit add(T value) Add a value to this moving average
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MovingAverage

        MovingAverage(Duration windowSize)