public interface HGBidirectionalIndex<KeyType,ValueType> extends HGIndex<KeyType,ValueType>
A HGBidirectionalIndex
provides efficient searching of an
index entry by value as well as by key. It can be used as an efficient
associative array between keys and values.
Modifier and Type | Method and Description |
---|---|
long |
countKeys(ValueType value)
Return the number of keys pointing to the given values.
|
HGRandomAccessResult<KeyType> |
findByValue(ValueType value)
Return a
HGSearchResult over all keys whose
value is the value parameter. |
KeyType |
findFirstByValue(ValueType value)
Return a key whose value is the
value parameter. |
addEntry, close, count, count, find, findFirst, getName, isOpen, open, removeAllEntries, removeEntry, scanKeys, scanValues
HGRandomAccessResult<KeyType> findByValue(ValueType value)
Return a HGSearchResult
over all keys whose
value is the value
parameter.
KeyType findFirstByValue(ValueType value)
Return a key whose value is the value
parameter. If
more than one index entry exists with that particular value, generally
the one that was added first will be returned, but this is not guarantueed.
long countKeys(ValueType value)
Return the number of keys pointing to the given values. This operation must execute in constant time, regardless of the data in the index.
value
- The value.Copyright © 2015. All rights reserved.