Class IDGenerator
java.lang.Object
org.apache.uima.caseditor.editor.util.IDGenerator
The IDGenerator generate unique IDs.
Attention: The maximal number of generateable IDs is Long.MAX_VALUE. If there are more than Long.MAX_VALUE calls to nextUniqueID() an IllegalStateException will be thrown.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IDGenerator
Retrieves the only instance of the IDGenerator.byte[]
Retrieve the next unique ID.
-
Method Details
-
nextUniqueID
public byte[] nextUniqueID()Retrieve the next unique ID.- Returns:
- - the unique id
- Throws:
IllegalStateException
- - if there are more than Long.MAX_VALUE calls toIDGenerator.nextUniqueID()
-
getInstance
Retrieves the only instance of the IDGenerator.- Returns:
- - the instance of the IDGenerator
-