|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.worldsaver.util.IDGenerator
This class guarantees to provide positive, unique long values for usage as IDs.
Constructor Summary | |
IDGenerator()
Creates a new empty generator. |
|
IDGenerator(java.util.HashSet val)
Creates a new generator with the already used values contained in the given HashSet. |
Method Summary | |
long |
getNextID()
Returns the next ID. |
void |
remove(long id)
Releases a value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IDGenerator()
public IDGenerator(java.util.HashSet val)
val
- the HashSet with the used valuesMethod Detail |
public long getNextID()
public void remove(long id)
id
- the value that is to be released
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |