org.hypergraphdb
Interface HGSortIndex<KeyType,ValueType>

All Superinterfaces:
HGIndex<KeyType,ValueType>, HGOrderedSearchable<KeyType,ValueType>, HGSearchable<KeyType,ValueType>
All Known Implementing Classes:
DefaultBiIndexImpl, DefaultIndexImpl

public interface HGSortIndex<KeyType,ValueType>
extends HGIndex<KeyType,ValueType>, HGOrderedSearchable<KeyType,ValueType>

A HGSortIndex is a HGIndex that maintains its keys in an order relation. It is therefore an HGOrderedSearchable entity.

Taking advantage of the new Java 1.5 feature allowing overriding methods to further specialize on the return type (i.e. allowing contravariant return types), all lookup methods of the super-interfaces are redeclared to return a HGRandomAccessResult.

Author:
Borislav Iordanov

Method Summary
 HGRandomAccessResult<ValueType> findGT(KeyType key)
          Return a range of all values strictly greater than the specified key.
 HGRandomAccessResult<ValueType> findGTE(KeyType key)
          Return a range of all values greater than or equal to the specified key.
 HGRandomAccessResult<ValueType> findLT(KeyType key)
          Return a range of all values strictly less than the specified key.
 HGRandomAccessResult<ValueType> findLTE(KeyType key)
          Return a range of all values less than or equal to the specified key.
 
Methods inherited from interface org.hypergraphdb.HGIndex
addEntry, close, count, count, find, findFirst, isOpen, open, removeAllEntries, removeEntry, scanKeys, scanValues
 

Method Detail

findLT

HGRandomAccessResult<ValueType> findLT(KeyType key)
Description copied from interface: HGOrderedSearchable

Return a range of all values strictly less than the specified key.

Specified by:
findLT in interface HGOrderedSearchable<KeyType,ValueType>
Parameters:
key - The search key.
Returns:
An HGSearchResult over the resulting range of values.

findGT

HGRandomAccessResult<ValueType> findGT(KeyType key)
Description copied from interface: HGOrderedSearchable

Return a range of all values strictly greater than the specified key.

Specified by:
findGT in interface HGOrderedSearchable<KeyType,ValueType>
Parameters:
key - The search key.
Returns:
An HGSearchResult over the resulting range of values.

findLTE

HGRandomAccessResult<ValueType> findLTE(KeyType key)
Description copied from interface: HGOrderedSearchable

Return a range of all values less than or equal to the specified key.

Specified by:
findLTE in interface HGOrderedSearchable<KeyType,ValueType>
Parameters:
key - The search key.
Returns:
An HGSearchResult over the resulting range of values.

findGTE

HGRandomAccessResult<ValueType> findGTE(KeyType key)
Description copied from interface: HGOrderedSearchable

Return a range of all values greater than or equal to the specified key.

Specified by:
findGTE in interface HGOrderedSearchable<KeyType,ValueType>
Parameters:
key - The search key.
Returns:
An HGSearchResult over the resulting range of values.