public class AtomicIntStat extends StatWithValueType<Integer>
AtomicInteger to be thread safe.definition| Constructor and Description |
|---|
AtomicIntStat(StatGroup group,
StatDefinition definition) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int count) |
void |
add(Stat<Integer> other)
Add the value of "other" to this stat.
|
void |
clear()
Resets the statistic to its initial state.
|
Stat<Integer> |
computeInterval(Stat<Integer> base)
Compute interval value with respect to the base value.
|
AtomicIntStat |
copy()
Returns a copy of this statistic.
|
AtomicIntStat |
copyAndClear()
Return a copy of this stat, and clear the stat's value.
|
void |
decrement() |
Integer |
get()
Returns the value of the statistic.
|
protected String |
getFormattedValue()
Returns the value of the statistic as a formatted string.
|
Class<Integer> |
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 |
negate()
Negate the value.
|
void |
set(Integer newValue)
Set the stat value.
|
getForTypecopyAndAdd, getDefinition, toString, toStringVerbosepublic AtomicIntStat(StatGroup group, StatDefinition definition)
public Class<Integer> getValueType()
StatWithValueTypeBaseStat.get() method.getValueType in class StatWithValueType<Integer>public Integer get()
BaseStatpublic void increment()
public void decrement()
public void add(int count)
public void add(Stat<Integer> other)
Statpublic void clear()
BaseStatpublic Stat<Integer> computeInterval(Stat<Integer> base)
StatcomputeInterval in class Stat<Integer>public void negate()
Statpublic AtomicIntStat copy()
BaseStatpublic AtomicIntStat copyAndClear()
StatcopyAndClear in class Stat<Integer>protected String getFormattedValue()
BaseStatgetFormattedValue in class BaseStat<Integer>Copyright © 2024. All rights reserved.