wt.util.uuid
Class BasicUuidGenerator

java.lang.Object
  extended bywt.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.


Field Summary
private  DecimalFormat format_
           
private  Random random_
           
private  String tail_
           
 
Constructor Summary
BasicUuidGenerator()
          Create a new generator.
 
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
 

Field Detail

format_

private DecimalFormat format_

random_

private Random random_

tail_

private String tail_
Constructor Detail

BasicUuidGenerator

public BasicUuidGenerator()
                   throws UuidGeneratorCreationException
Create a new generator.

Throws:
UuidGeneratorCreationException - if the local host name or address cannot be determined
Method Detail

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