public class CompositeIndexer extends HGKeyIndexer<byte[]>
Constructor and Description |
---|
CompositeIndexer() |
CompositeIndexer(HGHandle type,
HGKeyIndexer<Object>[] indexerParts) |
CompositeIndexer(String name,
HGHandle type,
HGKeyIndexer<Object>[] indexerParts) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Declared to enforce implementation.
|
Comparator<byte[]> |
getComparator(HyperGraph graph)
Return a comparator used to compare key values return by this indexer.
|
ByteArrayConverter<byte[]> |
getConverter(HyperGraph graph)
Return a
ByteArrayConverter capable of translating keys
returned by this indexer to/from a byte[] . |
HGKeyIndexer<Object>[] |
getIndexerParts() |
byte[] |
getKey(HyperGraph graph,
Object atom)
Returns an index key for the given atom.
|
int |
hashCode()
Declared to enforce implementation.
|
void |
setIndexerParts(HGKeyIndexer<Object>[] indexerParts) |
public CompositeIndexer()
public CompositeIndexer(HGHandle type, HGKeyIndexer<Object>[] indexerParts)
public CompositeIndexer(String name, HGHandle type, HGKeyIndexer<Object>[] indexerParts)
public boolean equals(Object other)
HGIndexer
Declared to enforce implementation.
equals
in interface HGIndexer<byte[],HGPersistentHandle>
equals
in class Object
public Comparator<byte[]> getComparator(HyperGraph graph)
HGIndexer
Return a comparator used to compare key values return by this indexer.
Note that the comparator's compare
method will be invoked
with byte[]
parameters. It is the comparator's responsibility
to convert them to the appropriate run-time type for performing the comparison
if need be.
The method may return null
if a default byte-by-byte comparator is to be
used.
graph
- The current HyperGraph instance.null
to use a default byte-by-byte comparison of keys.public ByteArrayConverter<byte[]> getConverter(HyperGraph graph)
HGIndexer
Return a ByteArrayConverter
capable of translating keys
returned by this indexer to/from a byte[]
.
graph
- The current HyperGraph instance.ByteArrayConverter
for type of index keys
return by this indexer or null
if keys are of type byte[]
.public byte[] getKey(HyperGraph graph, Object atom)
HGKeyIndexer
Returns an index key for the given atom.
getKey
in class HGKeyIndexer<byte[]>
graph
- The current HyperGraph
instance.atom
- The atom being indexed.byte[]
,
a non-null ByteArrayConverter
must be provided by the
getConverter
method.public int hashCode()
HGIndexer
Declared to enforce implementation.
hashCode
in interface HGIndexer<byte[],HGPersistentHandle>
hashCode
in class Object
public HGKeyIndexer<Object>[] getIndexerParts()
public void setIndexerParts(HGKeyIndexer<Object>[] indexerParts)
Copyright © 2015. All rights reserved.