public class UUID
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static char[] |
hexDigits
hexdigits for toString
|
Constructor and Description |
---|
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(java.lang.String string)
Generates a UUID from a string.
|
UUID(java.lang.String name,
java.lang.String namespace)
Create a name base UUID (version 3)
|
Modifier and Type | Method and Description |
---|---|
static UUID |
create()
Generate a UUID for this host using version 1 of [leach]
|
boolean |
equals(java.lang.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(java.io.File uuidStateFile)
Initialize the UUID generator.
|
java.lang.String |
toString()
Provide a String representation of a UUID as specified in section
3.5 of [leach].
|
public UUID(java.lang.String string)
public UUID(byte[] bytes)
public UUID(long[] longs)
public UUID(java.lang.String name, java.lang.String namespace)
public UUID()
public UUID(byte[] node, long time, short clock)
public int getVersion()
public boolean equals(java.lang.Object toUUID)
equals
in class java.lang.Object
true
if the UUIDs are equal;
false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
public byte[] getBytes()
public int hashCode()
java.util.Hashtable
.hashCode
in class java.lang.Object
Object.equals(java.lang.Object)
,
Hashtable
public static void init(java.io.File uuidStateFile)
uuidStateFile
- the to read/write the state frompublic static UUID create()
Copyright © 2010 - 2020 Adobe. All Rights Reserved