org.hypergraphdb
Interface HGRandomAccessResult<ValueType>

All Superinterfaces:
CloseMe, HGSearchResult<ValueType>, java.util.Iterator<ValueType>, TwoWayIterator<ValueType>
All Known Implementing Classes:
IndexResultSet, InMemoryIntersectionResult, KeyScanResultSet, SingleKeyResultSet, SingleValueResultSet, ZigZagIntersectionResult

public interface HGRandomAccessResult<ValueType>
extends HGSearchResult<ValueType>

A HGRandomAccessResult is a search result that is based on some kind of cursor that allows immediate positioning on some result value, if it exists. This is particularly useful for index-based search results where the whole result set is ordered and provides quick lookup to being with. A query execution plan may take advantage of this capability.

Author:
Borislav Iordanov

Nested Class Summary
static class HGRandomAccessResult.GotoResult
           Enumerates the possible results of a call to the goTo in a HGRandomAccessResult.
 
Field Summary
 
Fields inherited from interface org.hypergraphdb.HGSearchResult
EMPTY
 
Method Summary
 HGRandomAccessResult.GotoResult goTo(ValueType value, boolean exactMatch)
          Position the result set at a particular value if that value is indeed part of the result set.
 
Methods inherited from interface org.hypergraphdb.HGSearchResult
close, current, isOrdered
 
Methods inherited from interface org.hypergraphdb.TwoWayIterator
hasPrev, prev
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

goTo

HGRandomAccessResult.GotoResult goTo(ValueType value,
                                     boolean exactMatch)

Position the result set at a particular value if that value is indeed part of the result set.

Parameters:
value - The value where this result set should be positioned.
exactMatch - A flag indicating whether the passed in value should match exactly a value in the result set, or whether the cursor should be positioned to the closest value. Here "closest" means "smallest greater than the value parameter.
Returns:
A GotoResult.