public final class StatisticMinMaxCounter extends Statistics<StatisticMinMaxCounter>
Modifier and Type | Field and Description |
---|---|
protected long |
count |
protected double |
max |
protected double |
min
Counter operation
|
protected double |
sum |
replaceWith
Modifier | Constructor and Description |
---|---|
protected |
StatisticMinMaxCounter(java.lang.String name)
Creates a new instance of StatisticCounter
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(double value) |
protected StatisticMinMaxCounter |
cast()
Returns this statistics as the type provided typed argument.
|
void |
clear() |
double |
getAvg() |
double |
getCnt() |
double |
getMax() |
double |
getMin() |
static StatisticMinMaxCounter |
getStatistics(java.lang.String name)
Create new statistic counter with specified name or get the one already existing
|
double |
getSum() |
java.lang.String |
getValue()
Returns the value of this statistic.
|
boolean |
changedSinceCheckpoint()
Reports if value of min/max has been changed since the last setCheckpoint() call.
|
void |
removeValue(double value) |
void |
reset()
Reset the current statistic (this one only).
|
protected void |
setFrom(StatisticMinMaxCounter sourceStat)
Set the value of this statistic to the actual value of the given
sourceStat . |
void |
setCheckpoint()
Sets checkpoint.
|
java.lang.String |
toString()
Text representation
|
protected void |
updateFrom(StatisticMinMaxCounter sourceStat)
Statistics merging
|
addBoundStat, bindTo, canPerformOperation, disableGlobally, enableGlobally, getAllStatistics, getAllStatistics, getBoundStats, getBoundTo, getName, getStatistics, isBound, isEnabledGlobally, isRegisteredGlobally, printStatistics, printStatistics, printStatistics, readResolve, removeBoundStat, removeStatistic, resetStatistics, resetStatistics, unbind
protected double min
protected double max
protected double sum
protected long count
protected StatisticMinMaxCounter(java.lang.String name)
public void addValue(double value)
public void removeValue(double value)
public void clear()
public double getMin()
public double getMax()
public double getSum()
public double getCnt()
public double getAvg()
public java.lang.String getValue()
Statistics
getValue
in class Statistics<StatisticMinMaxCounter>
protected void updateFrom(StatisticMinMaxCounter sourceStat)
updateFrom
in class Statistics<StatisticMinMaxCounter>
sourceStat
- the statistic from which to update this statprotected void setFrom(StatisticMinMaxCounter sourceStat)
Statistics
sourceStat
.setFrom
in class Statistics<StatisticMinMaxCounter>
sourceStat
- the statistic from which to set this statpublic void reset()
reset
in class Statistics<StatisticMinMaxCounter>
public static StatisticMinMaxCounter getStatistics(java.lang.String name) throws java.lang.ClassCastException
java.lang.ClassCastException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean changedSinceCheckpoint()
public void setCheckpoint()
protected StatisticMinMaxCounter cast()
Statistics
cast
in class Statistics<StatisticMinMaxCounter>