Base class for all JE statistics. A single Stat embodies a value and
definition. See StatGroup for a description of how to create and display
Note that Stat intentionally does not contain the statistics value itself.
Instead, the concrete subclass will implement the value as the appropriate
primitive type. That's done to avoid wrapper classes like Integer and Long,
and to keep the overhead of statistics low.
A stat registers itself with an owning group.
public abstract void set(T newValue);
Add the value of "other" to this stat.
public abstract void add(Stat<T> other);
Initialize the stat to the proper value at startup, or reset the
stat when copyAndClear() is called.
public abstract void clear();
Return a copy of this stat, and clear the stat's value.
Return a string with the stat value formatted as appropriate for
Includes the per-stat description in the output string.
Returns true if this stat is zero or null, as is appropriate for its