public class IntStat extends Stat
Stat.AuxDataSource, Stat.Type| Constructor and Description |
|---|
IntStat() |
| Modifier and Type | Method and Description |
|---|---|
int |
getValue()
Returns the value of this integer statistic.
|
boolean |
increment(int delta)
Increments this statistic by the specified delta value.
|
void |
persistTo(com.threerings.io.ObjectOutputStream out,
Stat.AuxDataSource aux)
Serializes this instance for storage in the item database.
|
boolean |
setValue(int value)
Sets this statistic's value to the specified value.
|
void |
unpersistFrom(com.threerings.io.ObjectInputStream in,
Stat.AuxDataSource aux)
Unserializes this item from data obtained from the item database.
|
String |
valueToString()
Derived statistics must override this method and render their value to a string.
|
clone, crc32, getCode, getKey, getModCount, getType, getType, initType, isModified, setModCount, setModified, toStringpublic int getValue()
public boolean setValue(int value)
public boolean increment(int delta)
public String valueToString()
StatStat.toString() and to display the value in game.valueToString in class Statpublic void persistTo(com.threerings.io.ObjectOutputStream out,
Stat.AuxDataSource aux)
throws IOException
StatpersistTo in class StatIOExceptionpublic void unpersistFrom(com.threerings.io.ObjectInputStream in,
Stat.AuxDataSource aux)
throws IOException,
ClassNotFoundException
StatunpersistFrom in class StatIOExceptionClassNotFoundExceptionCopyright © 2015. All rights reserved.