xsmeral.pipe.stats
Class Average

java.lang.Object
  extended by xsmeral.pipe.stats.Average
All Implemented Interfaces:
StatFunction<Double>

public class Average
extends Object
implements StatFunction<Double>

Arithmetic average.


Constructor Summary
Average()
           
 
Method Summary
 void add()
          Adds one unit (may not make sense for all functions).
 void add(Double value)
          Adds the specified value.
 Double getValue()
          Returns result of this function over all values supplied since instantiation or last reset.
 void reset()
          Resets value of this function to the initial state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Average

public Average()
Method Detail

add

public void add()
Description copied from interface: StatFunction
Adds one unit (may not make sense for all functions).

Specified by:
add in interface StatFunction<Double>

add

public void add(Double value)
Description copied from interface: StatFunction
Adds the specified value.

Specified by:
add in interface StatFunction<Double>

getValue

public Double getValue()
Description copied from interface: StatFunction
Returns result of this function over all values supplied since instantiation or last reset.

Specified by:
getValue in interface StatFunction<Double>

reset

public void reset()
Description copied from interface: StatFunction
Resets value of this function to the initial state.

Specified by:
reset in interface StatFunction<Double>