|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.stats.data.StatModifier<T>
public abstract class StatModifier<T extends Stat>
Encapsulates a modification to a single stat that can be serialized and sent to a different server, if needed, to update stats loaded at runtime.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Constructor Summary | |
|---|---|
StatModifier(Stat.Type type)
Creates a modifier that will operate on the supplied stat type. |
|
| Method Summary | |
|---|---|
Stat.Type |
getType()
Returns the Stat.Type of the stat being modified. |
abstract void |
modify(T stat)
Applies the modification to the stat in question. |
void |
readObject(com.threerings.io.ObjectInputStream in)
Reads our custom streamable fields. |
void |
writeObject(com.threerings.io.ObjectOutputStream out)
Writes our custom streamable fields. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StatModifier(Stat.Type type)
| Method Detail |
|---|
public Stat.Type getType()
Stat.Type of the stat being modified.
public void writeObject(com.threerings.io.ObjectOutputStream out)
throws IOException
IOException
public void readObject(com.threerings.io.ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundExceptionpublic abstract void modify(T stat)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||