Constructor and Description |
---|
ArrayListRegistry()
Create an array list registry.
|
ArrayListRegistry(int initId)
Create an array list registry.
|
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.
|
public ArrayListRegistry()
public ArrayListRegistry(int initId)
initId
- the initial IDpublic boolean isIdExist(int id)
Registry
public T get(int id)
Registry
public int getNewId()
Registry
public void set(int id, T obj)
Registry
Copyright © 2013. All rights reserved.