| Modifier and Type | Class and Description |
|---|---|
static interface |
StatSet.Container
An interface to be implemented by an entity that wishes to be notified when the contents of
a stat set change.
|
| Constructor and Description |
|---|
StatSet()
Creates a blank stat set.
|
StatSet(Iterable<Stat> contents)
Creates a stat set with the specified contents.
|
StatSet(Iterator<Stat> contents)
Creates a stat set with the specified contents.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addQuietly(Stat stat)
Don't call this method, it's only needed by some tricky business we do when preventing
distributed object event generation for all but the bounty criteria related stats.
|
<T> void |
addToSetStat(Stat.Type type,
T value)
Adds a value to a
SetStat. |
void |
appendStat(Stat.Type type,
int value)
Appends an integer value to an
IntArrayStat. |
<T> boolean |
containsValue(Stat.Type type,
T value)
Returns true if the specified
SetStat contains the specified value, false
otherwise. |
int[] |
getIntArrayStat(Stat.Type type)
Returns the current value of the specified integer array statistic.
|
int |
getIntStat(Stat.Type type)
Returns the current value of the specified integer statistic.
|
int |
getMapValue(Stat.Type type,
String value)
Returns the value to which the specified string is mapped in a
StringMapStat or zero
if the value has not been mapped. |
int |
getMaxIntStat(Stat.Type type)
Returns the maximum value by which the specified integer statistic has ever been
incremented.
|
int |
getSetStatSize(Stat.Type type)
Returns the current size of the specified SetStat statistic.
|
void |
incrementMapStat(Stat.Type type,
String value,
int amount)
Increments a string value in a
StringMapStat. |
void |
incrementStat(Stat.Type type,
int delta)
Increments an integer statistic in this set.
|
void |
maxStat(Stat.Type type,
int value)
Sets an integer stat to the specified value, if it exceeds our existing recorded value.
|
void |
setContainer(StatSet.Container container)
Wires this stat set up to a containing user object.
|
void |
setStat(Stat.Type type,
int value)
Sets an integer statistic in this set.
|
<T extends Stat> |
syncStat(StatModifier<T> modifier)
Updates a stat in this set, using the supplied StatModifier.
|
asSet, clone, compare, contains, containsKey, entries, get, isEmpty, iterator, newDSet, newDSet, readObject, size, toArray, toArray, toArrayList, toString, typedClone, writeObjectequals, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic void setContainer(StatSet.Container container)
public <T extends Stat> void syncStat(StatModifier<T> modifier)
public void setStat(Stat.Type type, int value)
ClassCastException - thrown if the registered type of the specified stat is not an
IntStat.public void maxStat(Stat.Type type, int value)
ClassCastException - thrown if the registered type of the specified stat is not an
IntStat.public void incrementStat(Stat.Type type, int delta)
ClassCastException - thrown if the registered type of the specified stat is not an
IntStat.public void appendStat(Stat.Type type, int value)
IntArrayStat.ClassCastException - thrown if the registered type of the specified stat is not an
IntArrayStat.public <T> void addToSetStat(Stat.Type type, T value)
SetStat.ClassCastException - thrown if the registered type of the specified stat is not
an SetStat parameterized on the given type.public void incrementMapStat(Stat.Type type, String value, int amount)
StringMapStat.ClassCastException - thrown if the registered type of the specified stat is not an
StringMapStat.public int getIntStat(Stat.Type type)
ClassCastException - thrown if the registered type of the specified stat is not an
IntStat.public int getMaxIntStat(Stat.Type type)
ClassCastException - thrown if the registered type of the specified stat is not an
MaxIntStat.public int[] getIntArrayStat(Stat.Type type)
ClassCastException - thrown if the registered type of the specified stat is not an
IntArrayStat.public int getSetStatSize(Stat.Type type)
ClassCastException - thrown if the registered type of the specified stat is not an
SetStat.public <T> boolean containsValue(Stat.Type type, T value)
SetStat contains the specified value, false
otherwise.public int getMapValue(Stat.Type type, String value)
StringMapStat or zero
if the value has not been mapped.public void addQuietly(Stat stat)
Copyright © 2015. All rights reserved.