Package 

Class MovingAverage

  • 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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)