|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hypergraphdb.handle.UUIDPersistentHandle
public final class UUIDPersistentHandle
| Field Summary | |
|---|---|
static int |
SIZE
The number of bytes in the byte [] representation
of a UUIDPersistentHandle. |
static UUIDPersistentHandle |
UUID_NULL_HANDLE
|
| Constructor Summary | |
|---|---|
UUIDPersistentHandle()
Default constructor create a new UUID. |
|
| Method Summary | |
|---|---|
int |
compareTo(HGHandle other)
|
int |
compareTo(HGPersistentHandle other)
|
boolean |
equals(java.lang.Object other)
|
int |
hashCode()
|
static UUIDPersistentHandle |
makeHandle()
Construct a brand new UUID-based handle. |
static UUIDPersistentHandle |
makeHandle(byte[] value)
Construct from an existing UUID. |
static UUIDPersistentHandle |
makeHandle(byte[] value,
int offset)
Construct from an existing UUID. |
static UUIDPersistentHandle |
makeHandle(java.lang.String value)
Construct from an existing UUID. |
static UUIDPersistentHandle |
nullHandle()
Return the representation of a nil handle, that is a handle that does
not refer to anything. |
byte[] |
toByteArray()
Return a byte [] representation of this UUIDPersistentHandle. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SIZE
byte [] representation
of a UUIDPersistentHandle.
public static final UUIDPersistentHandle UUID_NULL_HANDLE
| Constructor Detail |
|---|
public UUIDPersistentHandle()
Default constructor create a new UUID.
| Method Detail |
|---|
public static UUIDPersistentHandle nullHandle()
Return the representation of a nil handle, that is a handle that does
not refer to anything.
public static UUIDPersistentHandle makeHandle()
Construct a brand new UUID-based handle. A UUID will be generated based on the algorithm configured at application started.
public static UUIDPersistentHandle makeHandle(byte[] value)
Construct from an existing UUID.
value - An array of UUIDPersistentHandle.SIZE bytes representing the UUID. If this parameter
is null or of size != UUIDPersistentHandle.SIZE, an IllegalArgumentException
is thrown.
public static UUIDPersistentHandle makeHandle(byte[] value,
int offset)
Construct from an existing UUID.
value - An array of offset + UUIDPersistentHandle.SIZE bytes representing the UUID. If this parameter
is null or of size < offset + UUIDPersistentHandle.SIZE, an IllegalArgumentException
is thrown.offset - The starting position in value of the data holding the
UUIDPersistentHandle representation.public static UUIDPersistentHandle makeHandle(java.lang.String value)
Construct from an existing UUID.
value - A UTF-8 encoded string representation of the UUIDpublic byte[] toByteArray()
Return a byte [] representation of this UUIDPersistentHandle.
toByteArray in interface HGPersistentHandlepublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(HGHandle other)
public int compareTo(HGPersistentHandle other)
compareTo in interface java.lang.Comparable<HGPersistentHandle>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||