|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.jabm.util.IdAllocator
public class IdAllocator
Utility class for handing out unique ids.
A using class wishing to assign unique ids to each of its instances should
declare a static member variable:
static IdAllocator idAllocator = new IdAllocator();
In its constructor it should use something like:
id = idAllocator.nextId();

| Field Summary | |
|---|---|
protected long |
nextId
|
| Constructor Summary | |
|---|---|
IdAllocator()
|
|
| Method Summary | |
|---|---|
long |
nextId()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long nextId
| Constructor Detail |
|---|
public IdAllocator()
| Method Detail |
|---|
public long nextId()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||