|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ascape.util.data.StatCollector
org.ascape.util.data.StatCollectorCSA
public class StatCollectorCSA
Stores aggregate data for values obtained for a statistic, including running sum and average.
StatCollector
,
StatCollectorCond
,
Serialized FormField Summary | |
---|---|
protected double |
sum
|
Fields inherited from class org.ascape.util.data.StatCollector |
---|
allMeasureNames, allMeasureNamesShort, autoCollect, COLLECTING, count, name, NOT_COLLECTING, SET_BY_DATAGROUP |
Constructor Summary | |
---|---|
StatCollectorCSA()
Constructs a new StatCollectorCSA. |
|
StatCollectorCSA(java.lang.String name)
Constructs a new StatCollectorCSA. |
|
StatCollectorCSA(java.lang.String name,
boolean autoCollect)
Constructs a new StatCollectorCSA. |
Method Summary | |
---|---|
void |
addValue(double value)
Add the value, incrementing count and adding sum. |
void |
clear()
Sets all values statistics to base values (0 or max.) |
double |
getAvg()
Returns the current average of all values added. |
double |
getSum()
Returns the current sum of all values added. |
double |
getTotal()
Returns the current sum of all values added. |
Methods inherited from class org.ascape.util.data.StatCollector |
---|
addValueFor, calculateCollection, calculateIterator, calculateValue, compareTo, createDataSeries, getAllDataSeries, getAllMeasureNames, getAllMeasureNamesShort, getCollectingLongitudinalDataMode, getCount, getDataGroup, getDataSeries, getName, getValue, isAutoCollect, isCalculated, isCollectingLongitudinalData, isPhase2, setAutoCollect, setCollectingLongitudinalDataMode, setDataGroup, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double sum
Constructor Detail |
---|
public StatCollectorCSA()
public StatCollectorCSA(java.lang.String name, boolean autoCollect)
name
- the name of the stat collector.autoCollect
- should the stat be collected automatically?public StatCollectorCSA(java.lang.String name)
name
- the name of the stat collector.Method Detail |
---|
public void clear()
clear
in class StatCollector
public void addValue(double value)
addValue
in class StatCollector
public double getTotal()
public double getSum()
public double getAvg()
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |