xsmeral.pipe.stats
Class Sum

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

public class Sum
extends Object
implements StatFunction<Long>

Sum function.


Constructor Summary
Sum()
           
 
Method Summary
 void add()
          Adds one unit (may not make sense for all functions).
 void add(Long value)
          Adds the specified value.
 Long 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

Sum

public Sum()
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<Long>

add

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

Specified by:
add in interface StatFunction<Long>

getValue

public Long 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<Long>

reset

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

Specified by:
reset in interface StatFunction<Long>