net.sourceforge.jabm.util
Class IdAllocator

java.lang.Object
  extended by net.sourceforge.jabm.util.IdAllocator

public class IdAllocator
extends java.lang.Object

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

nextId

protected long nextId
Constructor Detail

IdAllocator

public IdAllocator()
Method Detail

nextId

public long nextId()