jodd.idgen
Class UuidGenerator

java.lang.Object
  extended byjodd.idgen.UuidGenerator

public class UuidGenerator
extends java.lang.Object

Several UUID generators. Which one to use depends on destiantion evironemnt. Generated UUIDs are not sequencial.


Constructor Summary
UuidGenerator()
           
 
Method Summary
static java.lang.String generate()
          Returns just 10 random chars.
static java.lang.String generate(java.lang.Object o)
          Returns unique String of 16 chars.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UuidGenerator

public UuidGenerator()
Method Detail

generate

public static final java.lang.String generate(java.lang.Object o)
Returns unique String of 16 chars. This string is based on following template: 32bits from current time, 32bits from identityHashCode 32bits from random Total 96 bits, that are coded with base 6 so resulting string will have just 16 chars.

Parameters:
o -
Returns:
uuid as string of 16 chars

generate

public static final java.lang.String generate()
Returns just 10 random chars. Just based on current time and a random string.

Returns:
uuid string of 10 chars
See Also:
generate(Object o)


Jodd v0.24.5 Javadoc