T - the type of object in the registrypublic interface Registry<T>
| Modifier and Type | Method and Description |
|---|---|
T |
get(int id)
Retrieve an object from the registry.
|
int |
getNewId()
Get a new unused ID.
|
boolean |
isIdExist(int id)
Whether or not an object is in the registry.
|
int |
register(T obj)
Register an object.
|
void |
set(int id,
T obj)
Associate an object to a given ID.
|
void |
setNull(int id)
Remove the object associated with a given ID from the registry.
|
int register(T obj)
obj - the objectboolean isIdExist(int id)
id - the ID of the objectT get(int id)
id - the ID of the objectint getNewId()
void set(int id,
T obj)
id - the IDobj - the objectvoid setNull(int id)
id - the IDCopyright © 2013. All rights reserved.