|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hypergraphdb.HGHandleFactory
public class HGHandleFactory
The HGHandleFactory class is used to construct unique (UUID) handle
for hypergraph atoms.
| Field Summary | |
|---|---|
static HGPersistentHandle |
anyHandle
The anyHandle is a persistent handle constant that represents
a "don't care" handle during querying and comparison operations. |
| Constructor Summary | |
|---|---|
HGHandleFactory()
|
|
| Method Summary | |
|---|---|
static HGPersistentHandle |
anyHandle()
|
static HGPersistentHandle |
makeHandle()
Construct and return a new, unique persistent handle. |
static HGPersistentHandle |
makeHandle(byte[] buffer)
Construct a persistent handle from its byte array representation. |
static HGPersistentHandle |
makeHandle(byte[] buffer,
int offset)
Construct a persistent handle from its byte array representation where the byte array is part of a larger buffer and located at a particular offset. |
static HGPersistentHandle |
makeHandle(java.lang.String handleAsString)
Construct a persistent handle from its string representation. |
static HGPersistentHandle |
nullHandle()
Return the representation of a null persistent handle. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final HGPersistentHandle anyHandle
The anyHandle is a persistent handle constant that represents
a "don't care" handle during querying and comparison operations. It can abe used, for
instance, when defining an OrdererLinkCondition in a query.
For efficiency reasons, the equals method of the various implementations of
the HGHandle interface ignore this constant, even though it would be
more consistent to for anyHandle.equals(x) and x.equals(anyHandle)
to always return true.
| Constructor Detail |
|---|
public HGHandleFactory()
| Method Detail |
|---|
public static HGPersistentHandle makeHandle()
Construct and return a new, unique persistent handle. The handle is permanently unique. It can be persistent (serialized) and restored without ever conflicting with another handle.
public static HGPersistentHandle makeHandle(java.lang.String handleAsString)
Construct a persistent handle from its string representation.
public static HGPersistentHandle makeHandle(byte[] buffer)
Construct a persistent handle from its byte array representation.
buffer - The byte array holding the handle value.
public static HGPersistentHandle makeHandle(byte[] buffer,
int offset)
Construct a persistent handle from its byte array representation where the byte array is part of a larger buffer and located at a particular offset.
buffer - The byte array holding the handle value.offset - The offset within buffer where the handle value starts.public static HGPersistentHandle nullHandle()
Return the representation of a null persistent handle. A null
handle is a single instance and therefore can be compared for equality by
doing direct Java object reference comparison. A null handle can be
recorded in storage as any other persistent handle - it refers to no
value. Not that while HyperGraph's type system does not provide
for null atom values or value projections, null references
to values are permitted and supported through the null
HGPersistentHandle
public static HGPersistentHandle anyHandle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||