|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object spellcast.model.Id
public class Id
An Id
is used as an identifier for all model objects. It's purpose
is to be used in other classes to identify the object instead of
using a pointer to it. This reduces network traffic by sending
Id
s instead of the entire object.
An Id
is an opaque object, classes just need to create one
and only need to test for equality. There is no access to the internal fields.
Field Summary | |
---|---|
static Id |
EVERYONE
This Id indicates that a message is for everyone. |
static Id |
NO_ONE
This Id indicates that a message is from no one. |
static Id |
SPELLCAST
This |
Method Summary | |
---|---|
static Id |
createId()
|
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Id EVERYONE
Id
indicates that a message is for everyone.
public static final Id SPELLCAST
public static final Id NO_ONE
Id
indicates that a message is from no one.
Also used by the client when the network has not yet established a connection.
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static Id createId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |