public class MaxValueIntStat extends IntStat
IntStat by maintaining the maximum value that the stat has ever been
assigned (unlike MaxIntStat, which tracks the maximum value that the stat has ever
been incremented by).Stat.AuxDataSource, Stat.Type| Constructor and Description |
|---|
MaxValueIntStat() |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxValue()
Returns the maximum value that this integer statistic has ever been assigned.
|
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 getMaxValue()
public boolean setValue(int value)
IntStatpublic String valueToString()
StatStat.toString() and to display the value in game.valueToString in class IntStatpublic void persistTo(com.threerings.io.ObjectOutputStream out,
Stat.AuxDataSource aux)
throws IOException
StatpersistTo in class IntStatIOExceptionpublic void unpersistFrom(com.threerings.io.ObjectInputStream in,
Stat.AuxDataSource aux)
throws IOException,
ClassNotFoundException
StatunpersistFrom in class IntStatIOExceptionClassNotFoundExceptionCopyright © 2015. All rights reserved.