|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.id.NodeId
public class NodeId
Node identifier, i.e. an immutable 128 bit UUID.
| Field Summary | |
|---|---|
static int |
UUID_BYTE_LENGTH
Number of bytes in a UUID (16). |
static int |
UUID_FORMATTED_LENGTH
Chars in a UUID String. |
| Constructor Summary | |
|---|---|
NodeId()
Creates a random node identifier using a secure random number generator. |
|
NodeId(byte[] bytes)
Creates a node identifier from the given 16 bytes. |
|
NodeId(long msb,
long lsb)
Creates a node identifier from the given 128 bits. |
|
NodeId(Random random)
Creates a node identifier using the given random number generator. |
|
NodeId(String uuidString)
Creates a node identifier from the given UUID string. |
|
NodeId(UUID uuid)
Creates a node identifier from the given UUID. |
|
| Method Summary | |
|---|---|
int |
compareTo(NodeId that)
Compares this identifier to the given other one. |
boolean |
denotesNode()
Returns true to indicate that this is a node identifier. |
boolean |
equals(Object that)
Compares two UUID for equality. |
long |
getLeastSignificantBits()
Returns the 64 least significant bits of this identifier. |
long |
getMostSignificantBits()
Returns the 64 most significant bits of this identifier. |
byte[] |
getRawBytes()
Returns the 16 bytes of this identifier. |
int |
hashCode()
Returns a hash code of this identifier. |
String |
toString()
Returns the UUID string representation of this identifier. |
static NodeId |
valueOf(String uuid)
Returns a node identifier that is represented by the given UUID string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int UUID_FORMATTED_LENGTH
public static final int UUID_BYTE_LENGTH
| Constructor Detail |
|---|
public NodeId(long msb,
long lsb)
msb - most significant 64 bitslsb - least significant 64 bits
public NodeId(byte[] bytes)
throws NullPointerException,
ArrayIndexOutOfBoundsException
bytes - array of 16 bytes
NullPointerException - if the given array is null
ArrayIndexOutOfBoundsException - if the given array is less than 16 bytes longpublic NodeId(UUID uuid)
uuid - UUID
public NodeId(String uuidString)
throws IllegalArgumentException
uuid - UUID string
IllegalArgumentException - if the UUID string is invalid#fromString(String)public NodeId(Random random)
random - random number generatorpublic NodeId()
| Method Detail |
|---|
public static NodeId valueOf(String uuid)
throws IllegalArgumentException
uuid - the UUID string
IllegalArgumentException - if the given string is null
or not a valid UUIDpublic long getMostSignificantBits()
public long getLeastSignificantBits()
public byte[] getRawBytes()
public boolean denotesNode()
true to indicate that this is a node identifier.
denotesNode in interface ItemIdtruePropertyId,
NodeIdpublic int compareTo(NodeId that)
compareTo in interface Comparable<NodeId>that - other identifier
public String toString()
toString in class ObjectUUID.toString()public boolean equals(Object that)
equals in class ObjectObject.equals(Object)public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||