public class LongDiffStat extends MapStatComponent<Long,LongDiffStat>
| Constructor and Description |
|---|
LongDiffStat(Stat<Long> base,
long validityMillis)
Creates an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Resets the statistic to its initial state.
|
LongDiffStat |
copy()
Narrow the return type to the component type.
|
Long |
get()
Returns the value of the stat for the current time.
|
long |
get(long time)
Returns the value of the stat for the specified time.
|
protected String |
getFormattedValue(boolean useCommas)
Returns the value of the statistic as a formatted string, either using
or not using commas as requested.
|
boolean |
isNotSet()
Returns whether the statistic is in its initial state.
|
void |
set(long newValue)
Specifies a new value for the current time.
|
void |
set(long newValue,
long time)
Specifies a new value for the specified time.
|
String |
toString() |
getFormattedValuepublic long get(long time)
time - the timepublic void set(long newValue)
newValue - the new valuepublic void set(long newValue,
long time)
newValue - the new valuetime - the timepublic Long get()
public void clear()
BaseStatpublic LongDiffStat copy()
MapStatComponentcopy in class MapStatComponent<Long,LongDiffStat>protected String getFormattedValue(boolean useCommas)
MapStatComponentgetFormattedValue in class MapStatComponent<Long,LongDiffStat>useCommas - whether to use commaspublic boolean isNotSet()
BaseStatCopyright © 2024. All rights reserved.