|
|||||||||
| 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.IntArrayStat
public class IntArrayStat
Used to track an integer array statistic.
| 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 |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected int[] |
_value
Contains the integer list value of this statistic. |
| Fields inherited from class com.threerings.stats.data.Stat |
|---|
_codeToType, _crc, _modCount, _modified, _type |
| Constructor Summary | |
|---|---|
IntArrayStat()
|
|
| Method Summary | |
|---|---|
void |
appendValue(int value)
Appends a value to this statistic. |
int[] |
getValue()
Returns the value of this statistic. |
void |
persistTo(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(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. |
| Methods inherited from class com.threerings.stats.data.Stat |
|---|
clone, crc32, getCode, getKey, getModCount, getType, getType, initType, isModified, setModCount, setModified, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int[] _value
| Constructor Detail |
|---|
public IntArrayStat()
| Method Detail |
|---|
public int[] getValue()
public boolean setValue(int[] value)
public void appendValue(int value)
public String valueToString()
StatStat.toString() and to display the value in game.
valueToString in class Stat
public void persistTo(ObjectOutputStream out,
Stat.AuxDataSource aux)
throws IOException
Stat
persistTo in class StatIOException
public void unpersistFrom(ObjectInputStream in,
Stat.AuxDataSource aux)
throws IOException,
ClassNotFoundException
Stat
unpersistFrom in class StatIOException
ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||