|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecty25.base.LayeredGraph.IDCreator
A utility class that creates unique IDs. It does so be keeping track of previously created IDs.
Constructor Summary | |
LayeredGraph.IDCreator()
Instantiates a new IDCreator that assigns IDs in the
range [1,inf) . |
|
LayeredGraph.IDCreator(int startID)
Instantiates a new IDCreator that assigns IDs in the
range [startID,inf) . |
Method Summary | |
int |
createID()
Returns a new and unique ID. |
void |
removeID(int id)
Marks the passed as ready for reuse. |
void |
setUsed(int id)
Tells the IDCreator that the passed ID should not be
used for creating new IDs, since it is already used. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LayeredGraph.IDCreator()
IDCreator
that assigns IDs in the
range [1,inf)
.
public LayeredGraph.IDCreator(int startID)
IDCreator
that assigns IDs in the
range [startID,inf)
.
Method Detail |
public int createID()
public void removeID(int id)
public void setUsed(int id)
IDCreator
that the passed ID should not be
used for creating new IDs, since it is already used.
id
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |