|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.haphazard.util.IDServer
Controls and keeps track of all known ids of the world.
Method Summary | |
void |
assign(long id,
java.lang.Object object)
Assigns an id to an object for easy retrieval of objects |
void |
clear()
Clears the ID structure |
long |
create()
Creates a new id. |
void |
create(GraphicalObject object)
Creates and assigns an id to a graphical object |
java.lang.Object |
get(long id)
Gets an object that has been assigned an id. |
static IDServer |
getInstance()
Gets the single instance of the ID server |
void |
remove(long id)
Removes a certain id from the server |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static IDServer getInstance()
public void assign(long id, java.lang.Object object)
id
- The ID to assignobject
- The object that should be assigned to the idpublic java.lang.Object get(long id)
id
- The id to find
public void remove(long id)
id
- The id to removepublic long create()
public void create(GraphicalObject object)
object
- The object to assign an id topublic void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |