|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.util.UUID
public class UUID
A Universally Unique Identifier (UUID) is a 128 bit number generated according to an algorithm that is garanteed to be unique in time and space from all other UUIDs. It consists of an IEEE 802 Internet Address and various time stamps to ensure uniqueness. For a complete specification, see http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-05.txt
| Field Summary | |
|---|---|
static char[] |
hexDigits
hexdigits for toString |
| Constructor Summary | |
|---|---|
UUID()
Generates a random UUID (version 4) |
|
UUID(byte[] bytes)
Creates a UUID from a byte array. |
|
UUID(byte[] node,
long time,
short clock)
Generate a time-based UUID for this host (version 1). |
|
UUID(long[] longs)
Creates a UUID from 2 longs |
|
UUID(String string)
Generates a UUID from a string. the string must have the form. the version is set accoridingly |
|
UUID(String name,
String namespace)
Create a name base UUID (version 3) |
|
| Method Summary | |
|---|---|
static UUID |
create()
Generate a UUID for this host using version 1 of [leach] |
boolean |
equals(Object toUUID)
Compare two UUIDs |
byte[] |
getBytes()
Returns the bytes of the uuid |
int |
getVersion()
Get the UUID version number. |
int |
hashCode()
Returns a hash code value for the object. |
static void |
init(File uuidStateFile)
Initialize the UUID generator. |
String |
toString()
Provide a String representation of a UUID as specified in section 3.5 of [leach]. it has this format: "00000000-0000-0000-0000-000000000000" |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char[] hexDigits
| Constructor Detail |
|---|
public UUID(String string)
public UUID(byte[] bytes)
public UUID(long[] longs)
public UUID(String name,
String namespace)
public UUID()
public UUID(byte[] node,
long time,
short clock)
| Method Detail |
|---|
public int getVersion()
public boolean equals(Object toUUID)
equals in class Objecttrue if the UUIDs are equal;
false otherwise.public String toString()
toString in class Objectpublic byte[] getBytes()
public int hashCode()
java.util.Hashtable.
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtablepublic static void init(File uuidStateFile)
uuidStateFile - the to read/write the state frompublic static UUID create()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||