Stat.AuxDataSource, Stat.Type| Constructor and Description |
|---|
IntSetStat()
Constructs a new IntSetStat that will store up to 255 ints.
|
IntSetStat(int maxSize)
Constructs a new IntSetStat that will store up to maxSize ints.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Integer key)
Adds the specified int to this set.
|
boolean |
contains(Integer key)
Returns true if the specified int is contained in this set.
|
void |
persistTo(com.threerings.io.ObjectOutputStream out,
Stat.AuxDataSource aux)
Serializes this instance for storage in the item database.
|
int |
size()
Returns the number of values stored in the set.
|
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 IntSetStat()
public IntSetStat(int maxSize)
maxSize - the maximum number of ints to store in the IntSetStat. Must be <= 255.public int size()
public boolean contains(Integer key)
public boolean add(Integer key)
public 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 StatIOExceptionClassNotFoundExceptionpublic String valueToString()
StatStat.toString() and to display the value in game.valueToString in class StatCopyright © 2015. All rights reserved.