|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.stats.data.Stat
com.threerings.stats.data.StringMapStat
public abstract class StringMapStat
Used to track a statistic comprised of a set of strings that map to numeric counts.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.stats.data.Stat |
|---|
Stat.AuxDataSource, Stat.Type |
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Constructor Summary | |
|---|---|
StringMapStat()
|
|
| Method Summary | |
|---|---|
boolean |
containsKey(String key)
Returns true if the specified key is contained in this map. |
int |
get(String key)
Returns the value to which the specified key maps or zero if it is not contained in this map. |
boolean |
increment(String key,
int amount)
Adds the specified key value pair to this set, overwriting any existing mapping. |
boolean |
put(String key,
int value)
Adds the specified key value pair to this set, overwriting any existing mapping. |
String |
valueToString()
Derived statistics must override this method and render their value to a string. |
| Methods inherited from class com.threerings.stats.data.Stat |
|---|
clone, getCode, getKey, getModCount, getType, getType, initType, isModified, persistTo, setModCount, setModified, toString, unpersistFrom |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringMapStat()
| Method Detail |
|---|
public boolean containsKey(String key)
public int get(String key)
public boolean put(String key,
int value)
public boolean increment(String key,
int amount)
public String valueToString()
StatStat.toString() and to display the value in game.
valueToString in class Stat
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||