public class MultiStat
extends java.lang.Object
implements java.beans.PropertyChangeListener
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,SimpleStatsTally> |
tallyStats
A container for the SimpleStatsTallies.
|
private java.util.Map<java.lang.String,SimpleStatsTimeVarying> |
timeVaryingStats
A container for the SimpleStatsTimeVarying.
|
| Constructor and Description |
|---|
MultiStat()
Creates a new empty MultiStat.
|
| Modifier and Type | Method and Description |
|---|---|
protected SimpleStatsTally |
createNewTallyStat(java.lang.String name)
Creates a new SimpleStatsTally for the given property name and adds it to
the Map.
|
protected SimpleStatsTimeVarying |
createNewTimeVaryingStat(java.lang.String name)
Creates a new SimpleStatsTimeVarying for the given property name and adds
it to the Map.
|
SimpleStatsTally[] |
getAllTallyStats() |
SimpleStatsTimeVarying[] |
getAllTimeVaryingStats() |
java.lang.String[] |
getNames() |
SimpleStatsTally |
getTallyStats(java.lang.String name)
Returns a copy of the SimpleStatsTally for the given property name.
|
SimpleStatsTimeVarying |
getTimeVaryingStats(java.lang.String name)
Returns a copy of the SimpleStatsTimeVarying for the given property name.
|
protected void |
newObservation(java.lang.String name,
boolean value)
Adds the observation to both a SimpleStatsTally and a
SimpleStatsTimeVarying, creating them if this is the first observation
for the given property.
|
protected void |
newObservation(java.lang.String name,
double value)
Adds the observation to both a SimpleStatsTally and a
SimpleStatsTimeVarying, creating them if this is the first observation
for the given property.
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Notifies this MultiStat of a property change.
|
void |
reset()
Resets this MultiStat to its original empty state.
|
java.lang.String |
toString() |
private final java.util.Map<java.lang.String,SimpleStatsTally> tallyStats
private final java.util.Map<java.lang.String,SimpleStatsTimeVarying> timeVaryingStats
public void reset()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerprotected void newObservation(java.lang.String name,
double value)
name - Given property namevalue - Given valueprotected void newObservation(java.lang.String name,
boolean value)
name - Given namevalue - Given value (true or false)protected SimpleStatsTally createNewTallyStat(java.lang.String name)
name - Given property nameprotected SimpleStatsTimeVarying createNewTimeVaryingStat(java.lang.String name)
name - Given property namepublic SimpleStatsTally getTallyStats(java.lang.String name)
null if the property cannot be found.name - Given property namepublic SimpleStatsTally[] getAllTallyStats()
public SimpleStatsTimeVarying getTimeVaryingStats(java.lang.String name)
null if the property cannot be found.name - given property namepublic SimpleStatsTimeVarying[] getAllTimeVaryingStats()
public java.lang.String[] getNames()
public java.lang.String toString()
toString in class java.lang.Object