public interface HGSearchResult<T> extends TwoWayIterator<T>, CloseMe
Represents the result set of a HyperGraph query. Note that results are
represented as bi-directional iterator with a current position. Moreover,
in general search results must be properly closed as they may hold external system
resources such open disk files etc.
| Modifier and Type | Field and Description |
|---|---|
static HGRandomAccessResult<? extends Object> |
EMPTY
This object represents an empty
HGSearchResult. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Free all system resources held up by the result set and invalidate
it for further use.
|
T |
current()
Returns the current element in the result set.
|
boolean |
isOrdered()
Return
true if the elements in this search result are in ordered
and false otherwise. |
hasPrev, prevstatic final HGRandomAccessResult<? extends Object> EMPTY
This object represents an empty HGSearchResult. Calls to
hasPrev or hasNext will always return false.
Calls to current, next or prev will always
throw a NoSuchElementException.
T current()
Returns the current element in the result set. If there is no current element,
java.util.NoSuchElementException is thrown. There
is no current element if the next method was never invoked.
HGSearchResult.void close()
Free all system resources held up by the result set and invalidate it for further use.
boolean isOrdered()
Return true if the elements in this search result are in ordered
and false otherwise. It is assumed that when elements are ordered,
they are instances of java.lang.Comparable
Copyright © 2015. All rights reserved.