|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dna.common.statistic.SimpleStatistics<T>
T - the number type used in these statistics@ThreadSafe public class SimpleStatistics<T extends Number>

Encapsulation of the statistics for a series of values to which new values are frequently added. The statistics include the
minimum, maximum, total (aggregate sum), and mean (average). See DetailedStatistics for a subclass that also calculates the median, standard deviation and the histogram of the values.
This class is threadsafe.
| Constructor Summary | |
|---|---|
SimpleStatistics(MathOperations<T> operations)
|
|
| Method Summary | |
|---|---|
void |
add(T value)
Add a new value to these statistics. |
int |
getCount()
Get the number of values that have been measured. |
MathOperations<T> |
getMathOperations()
|
T |
getMaximum()
Get the maximum value in the series. |
T |
getMean()
Return the approximate mean (average) value represented as an instance of the operand type. |
double |
getMeanValue()
Return the mean (average) value. |
T |
getMinimum()
Get the minimum value in the series. |
T |
getTotal()
Get the aggregate sum of the values in the series. |
void |
reset()
Reset the statistics in this object, and clear out any stored information. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleStatistics(MathOperations<T> operations)
| Method Detail |
|---|
public void add(T value)
value - the new valuepublic T getTotal()
count is 0public T getMaximum()
count is 0public T getMinimum()
count is 0public int getCount()
public T getMean()
getMeanValue().
count is 0public double getMeanValue()
count is 0getMean()public void reset()
public MathOperations<T> getMathOperations()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||