|
|||||||||
| 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 |
|---|
Streamable.Closure |
| Field Summary | |
|---|---|
protected Stat.Type |
_type
The type of the stat on which we're operating. |
| Constructor Summary | |
|---|---|
protected |
StatModifier()
Constructs an empty StatModifier (for Streaming purposes). |
|
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(ObjectInputStream in)
Reads our custom streamable fields. |
void |
writeObject(ObjectOutputStream out)
Writes our custom streamable fields. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient Stat.Type _type
| Constructor Detail |
|---|
public StatModifier(Stat.Type type)
protected StatModifier()
| Method Detail |
|---|
public Stat.Type getType()
Stat.Type of the stat being modified.
public void writeObject(ObjectOutputStream out)
throws IOException
IOException
public void readObject(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 | ||||||||