|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimnet.Statistics
General class for keeping statistics.
| Nested Class Summary | |
protected class |
Statistics.StatisticData
Inner class for storage of individual statistics |
| Field Summary | |
private java.util.Vector |
stats
The statistics' data. |
| Constructor Summary | |
Statistics()
|
|
| Method Summary | |
void |
clear()
Reset all of the statistics to zero. |
protected int |
defineStatistic(java.lang.String name)
This method should be called from the constructor of subclasses to define statistics. |
protected abstract java.lang.String |
getHeader()
Return the header to use for the toString method. |
java.lang.String |
getStatisticString(int type)
Public version of the getStatisticString method. |
protected abstract java.lang.String |
getStatisticString(Statistics.StatisticData sd)
Return a string for a particular statistic. |
void |
record(int type,
double extra)
Record the specified values |
void |
record(int type,
int stat)
|
void |
record(int type,
int stat,
double extra)
|
protected void |
recordAction(Statistics.StatisticData sd,
int stat,
double extra)
Update the statistics data object with the new values to record |
java.lang.String |
toString()
Return a string representation of this statistics object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.util.Vector stats
| Constructor Detail |
public Statistics()
| Method Detail |
protected final int defineStatistic(java.lang.String name)
public final void record(int type,
double extra)
public final void record(int type,
int stat)
public final void record(int type,
int stat,
double extra)
protected void recordAction(Statistics.StatisticData sd,
int stat,
double extra)
public final void clear()
throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionprotected abstract java.lang.String getHeader()
protected abstract java.lang.String getStatisticString(Statistics.StatisticData sd)
public final java.lang.String getStatisticString(int type)
public final java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||