|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectStatistic
public class Statistic
Abstract data type to collect values and provide certain statistical properties of the collection.
Field Summary | |
---|---|
protected double |
currentValue
|
protected double |
highestValue
|
protected double |
lowestValue
|
protected int |
numSamples
|
protected java.lang.String |
statisticName
|
protected double |
sumOfValues
|
protected double |
sumsqOfValues
|
Constructor Summary | |
---|---|
Statistic(java.lang.String name)
Constructor |
Method Summary | |
---|---|
void |
collect(double value)
Adds a value to the statistic collection |
int |
count()
Retrieves the count of how many values collected so far |
double |
current()
Retrieves the most recent value collected |
double |
highest()
Retrieves the highest value collected so far |
double |
lowest()
Retrieves the lowest value collected so far |
double |
mean()
Retrieves the mean (average) of the values collected so far |
java.lang.String |
name()
Retrieves the name given to the Statistic object |
double |
standardDeviation()
Retrieves the standard deviation of the values collected so far |
double |
sum()
Retrieves the sum of the values collected so far |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int numSamples
protected double sumOfValues
protected double sumsqOfValues
protected double lowestValue
protected double highestValue
protected double currentValue
protected java.lang.String statisticName
Constructor Detail |
---|
public Statistic(java.lang.String name)
name
- String with descriptive name for this objectMethod Detail |
---|
public java.lang.String name()
public double lowest()
public double highest()
public double current()
public double sum()
public int count()
public double mean()
public double standardDeviation()
public void collect(double value)
value
- the value to be sampled
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |