public class IntStat extends StatWithValueType<Integer>
definition| Constructor and Description |
|---|
IntStat(StatGroup group,
StatDefinition definition) |
IntStat(StatGroup group,
StatDefinition definition,
int counter) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int count) |
void |
add(Stat<Integer> otherStat)
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.
|
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.
|
getForTypecopy, copyAndAdd, copyAndClear, getDefinition, toString, toStringVerbosepublic IntStat(StatGroup group, StatDefinition definition)
public IntStat(StatGroup group, StatDefinition definition, int counter)
public Class<Integer> getValueType()
StatWithValueTypeBaseStat.get() method.getValueType in class StatWithValueType<Integer>public Integer get()
BaseStatpublic void increment()
public void add(int count)
public void add(Stat<Integer> otherStat)
Statpublic Stat<Integer> computeInterval(Stat<Integer> base)
StatcomputeInterval in class Stat<Integer>public void negate()
Statpublic void clear()
BaseStatprotected String getFormattedValue()
BaseStatgetFormattedValue in class BaseStat<Integer>Copyright © 2024. All rights reserved.