|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.uuid.UUID
public class UUID
UUID
represents a Universally Unique IDentifier per IETF
RFC 4122 ("A Universally Unique IDentifier (UUID) URN Namespace"),
Section 4.
This is a lightweight implementation of an UUID, disregarding the different versions of UUIDs.
Field Summary |
---|
Constructor Summary | |
---|---|
UUID(byte[] b)
Constructs a UUID from a 16 byte array. |
|
UUID(DataInput input)
Constructs a UUID from a DataInput. |
|
UUID(long mostSignificant,
long leastSignificant)
Constructs a UUID from two long values in most significant byte, and least significant bytes order. |
|
UUID(String uuidString)
Constructs a UUID from a UUID formatted String. |
Method Summary | |
---|---|
int |
compareTo(Object compareTo)
Compares two UUIDs. |
boolean |
equals(Object obj)
Compares two UUID for equality. |
static UUID |
fromString(String uuidString)
Parses a string for a UUID. |
long |
getLeastSignificantBits()
Returns the least significant bits stored in the uuid's internal structure. |
long |
getMostSignificantBits()
Returns the most significant bits stored in the uuid's internal structure. |
byte[] |
getRawBytes()
Returns a copy of the byte values contained in this UUID. |
int |
hashCode()
Returns a hash code value for the object. |
static UUID |
randomUUID()
Returns a new version 4 UUID, based upon Random bits. |
String |
toString()
Returns a string representation of the UUID. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UUID(byte[] b) throws IllegalArgumentException
b
- the 16 byte array to construct this UUID from.
IllegalArgumentException
- argument must be 16 bytespublic UUID(DataInput input) throws IOException
input
- the datainput with 16 bytes to read in from.
IOException
- exception if there is an IO problem also
argument must contain 16 bytes.public UUID(long mostSignificant, long leastSignificant)
mostSignificant
- the most significant 8 bytes of the uuid to be
constructed.leastSignificant
- the least significant 8 bytes of the uuid to be
constructed.public UUID(String uuidString) throws IllegalArgumentException
uuidString
- the String representing a UUID to construct this UUID
IllegalArgumentException
- String must be a properly formatted UUID
stringMethod Detail |
---|
public static UUID fromString(String uuidString) throws IllegalArgumentException
uuidString
- the UUID formatted String to parse.
null
if the formatted string could
not be parsed.
IllegalArgumentException
- the String must be a properly formatted
UUID String.public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public int compareTo(Object compareTo) throws ClassCastException
compareTo
in interface Comparable
ClassCastException
Comparable.compareTo(Object)
public long getLeastSignificantBits()
public long getMostSignificantBits()
public byte[] getRawBytes()
public static UUID randomUUID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |