Package adams.data.id
Class RuntimeIDGenerator
- java.lang.Object
-
- adams.data.id.RuntimeIDGenerator
-
public class RuntimeIDGenerator extends Object
Helper class for generating unique IDs at runtime.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Current
the current ID.protected static RuntimeIDGenerator
m_Singleton
the singleton.
-
Constructor Summary
Constructors Modifier Constructor Description protected
RuntimeIDGenerator()
Initializes the generator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RuntimeIDGenerator
getSingleton()
Returns the singleton of the generator.int
next()
Returns the next ID.
-
-
-
Field Detail
-
m_Current
protected int m_Current
the current ID.
-
m_Singleton
protected static RuntimeIDGenerator m_Singleton
the singleton.
-
-
Method Detail
-
next
public int next()
Returns the next ID.- Returns:
- the next ID
-
getSingleton
public static RuntimeIDGenerator getSingleton()
Returns the singleton of the generator.- Returns:
- the singleton
-
-