|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hypergraphdb.query.impl.ZigZagIntersectionResult<T>
public class ZigZagIntersectionResult<T>
The ZigZagIntersectionResult operates on two sorted, random access
result sets.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.hypergraphdb.HGRandomAccessResult |
|---|
HGRandomAccessResult.GotoResult |
| Field Summary |
|---|
| Fields inherited from interface org.hypergraphdb.HGSearchResult |
|---|
EMPTY |
| Fields inherited from interface org.hypergraphdb.HGSearchResult |
|---|
EMPTY |
| Constructor Summary | |
|---|---|
ZigZagIntersectionResult()
|
|
ZigZagIntersectionResult(HGRandomAccessResult<T> left,
HGRandomAccessResult<T> right)
|
|
| Method Summary | |
|---|---|
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. |
HGRandomAccessResult.GotoResult |
goTo(T value,
boolean exactMatch)
Position the result set at a particular value if that value is indeed part of the result set. |
boolean |
hasNext()
|
boolean |
hasPrev()
Return true if there is a previous element in the current
iteration state and false otherwise. |
void |
init(HGSearchResult<T> left,
HGSearchResult<T> right)
|
boolean |
isOrdered()
Return true if the elements in this search result are in ordered
and false otherwise. |
T |
next()
|
T |
prev()
Returns the previous element in this iteration. |
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZigZagIntersectionResult()
public ZigZagIntersectionResult(HGRandomAccessResult<T> left,
HGRandomAccessResult<T> right)
| Method Detail |
|---|
public void init(HGSearchResult<T> left,
HGSearchResult<T> right)
init in interface RSCombiner<T>
public HGRandomAccessResult.GotoResult goTo(T value,
boolean exactMatch)
HGRandomAccessResultPosition the result set at a particular value if that value is indeed part of the result set.
goTo in interface HGRandomAccessResult<T>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.
GotoResult.public void close()
HGSearchResultFree all system resources held up by the result set and invalidate it for further use.
close in interface HGSearchResult<T>close in interface CloseMepublic T current()
HGSearchResultReturns the current element in the result set. If there is no current element,
java.util.NoSuchElementException is thrown. There
is no current element in one of two cases: either the
result set is empty or the next method was never
invoked.
current in interface HGSearchResult<T>HGSearchResult.public boolean isOrdered()
HGSearchResultReturn 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
isOrdered in interface HGSearchResult<T>public boolean hasPrev()
TwoWayIterator
Return true if there is a previous element in the current
iteration state and false otherwise. After the iterator
has been initialized, the value of hasPrev will always be
false.
hasPrev in interface TwoWayIterator<T>public T prev()
TwoWayIteratorReturns the previous element in this iteration.
prev in interface TwoWayIterator<T>public boolean hasNext()
hasNext in interface java.util.Iterator<T>public T next()
next in interface java.util.Iterator<T>public void remove()
remove in interface java.util.Iterator<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||