|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the type of object in the registrypublic interface Registry<T>
A generic registry.
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
int register(T obj)
obj - the object
boolean isIdExist(int id)
id - the ID of the object
T get(int id)
id - the ID of the object
int getNewId()
void set(int id,
T obj)
id - the IDobj - the objectvoid setNull(int id)
id - the ID
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||