|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hypergraphdb.query.impl.PipedResult
public class PipedResult
A piped query result takes the output of a query, in the form of
a HGSearchResult instance and uses it as input to a "pipe"
query.
Such a result may be used to implement various query operators (e.g. union, intersection) when one of the operands is an indexed set and can be queried directly by a key.
| Field Summary |
|---|
| Fields inherited from interface org.hypergraphdb.HGSearchResult |
|---|
EMPTY |
| Constructor Summary | |
|---|---|
PipedResult(HGSearchResult in,
KeyBasedQuery pipe,
boolean own_in)
|
|
| Method Summary | |
|---|---|
void |
close()
Free all system resources held up by the result set and invalidate it for further use. |
java.lang.Object |
current()
Returns the current element in the result set. |
boolean |
hasNext()
|
boolean |
hasPrev()
Return true if there is a previous element in the current
iteration state and false otherwise. |
boolean |
isOrdered()
Return true if the elements in this search result are in ordered
and false otherwise. |
java.lang.Object |
next()
|
java.lang.Object |
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 PipedResult(HGSearchResult in,
KeyBasedQuery pipe,
boolean own_in)
in - The input query result, can't be null.pipe - The pipe query, can't be null.own_in - Specifies whether to close the input result object when this object is closed.| Method Detail |
|---|
public java.lang.Object 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 HGSearchResultHGSearchResult.public void close()
HGSearchResultFree all system resources held up by the result set and invalidate it for further use.
close in interface HGSearchResultclose in interface CloseMepublic 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 TwoWayIteratorpublic java.lang.Object prev()
TwoWayIteratorReturns the previous element in this iteration.
prev in interface TwoWayIteratorpublic void remove()
remove in interface java.util.Iteratorpublic boolean hasNext()
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorpublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||