wt.util.uuid
Class BasicUuidGenerator
java.lang.Object
wt.util.uuid.BasicUuidGenerator
- All Implemented Interfaces:
- UuidGenerator
- public class BasicUuidGenerator
- extends Object
- implements UuidGenerator
A UUID generator which combines time a, random number from 0-999999999, the
numeric address in memory of the generator, and the generating system's IP address.
Method Summary |
static void |
main(String[] args)
Generate and display a new UUID using the BasicUuidGenerator. |
UUID |
newId()
Create a new UUID. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
format_
private DecimalFormat format_
random_
private Random random_
tail_
private String tail_
BasicUuidGenerator
public BasicUuidGenerator()
throws UuidGeneratorCreationException
- Create a new generator.
- Throws:
UuidGeneratorCreationException
- if the local host name or address cannot be determined
main
public static void main(String[] args)
- Generate and display a new UUID using the BasicUuidGenerator.
newId
public UUID newId()
- Create a new UUID.
- Specified by:
newId
in interface UuidGenerator