public class LongStat extends StatWithValueType<Long>
| Modifier and Type | Field and Description |
|---|---|
protected long |
counter |
definition| Constructor and Description |
|---|
LongStat(StatGroup group,
StatDefinition definition) |
LongStat(StatGroup group,
StatDefinition definition,
long counter) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long count) |
void |
add(Stat<Long> other)
Add the value of "other" to this stat.
|
void |
clear()
Resets the statistic to its initial state.
|
Stat<Long> |
computeInterval(Stat<Long> base)
Compute interval value with respect to the base value.
|
Long |
get()
Returns the value of the statistic.
|
protected String |
getFormattedValue()
Returns the value of the statistic as a formatted string.
|
Class<Long> |
getValueType()
Returns the type of the value returned by the
BaseStat.get() method. |
void |
increment() |
boolean |
isNotSet()
Returns whether the statistic is in its initial state.
|
void |
max(long count) |
void |
negate()
Negate the value.
|
void |
set(Long newValue)
Set the stat value.
|
getForTypecopy, copyAndAdd, copyAndClear, getDefinition, toString, toStringVerbosepublic LongStat(StatGroup group, StatDefinition definition)
public LongStat(StatGroup group, StatDefinition definition, long counter)
public Class<Long> getValueType()
StatWithValueTypeBaseStat.get() method.getValueType in class StatWithValueType<Long>public void increment()
public void add(long count)
public void max(long count)
public void add(Stat<Long> other)
Statpublic Stat<Long> computeInterval(Stat<Long> base)
StatcomputeInterval in class Stat<Long>public void negate()
Statpublic void clear()
BaseStatprotected String getFormattedValue()
BaseStatgetFormattedValue in class BaseStat<Long>Copyright © 2024. All rights reserved.