|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hypergraphdb.query.impl.HandleArrayResultSet
public class HandleArrayResultSet
Implements a HGSearchResult comprising the atoms in a given HGHandle array.
Note: this is not an ordered result set, but can easily be made so if this proves beneficial.
| Field Summary |
|---|
| Fields inherited from interface org.hypergraphdb.HGSearchResult |
|---|
EMPTY |
| Constructor Summary | |
|---|---|
HandleArrayResultSet(HGHandle[] array)
|
|
HandleArrayResultSet(HGHandle[] array,
int start)
|
|
HandleArrayResultSet(HGHandle[] array,
int start,
int end)
|
|
| Method Summary | |
|---|---|
void |
close()
Free all system resources held up by the result set and invalidate it for further use. |
HGHandle |
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. |
HGHandle |
next()
|
HGHandle |
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 HandleArrayResultSet(HGHandle[] array)
public HandleArrayResultSet(HGHandle[] array,
int start)
public HandleArrayResultSet(HGHandle[] array,
int start,
int end)
| Method Detail |
|---|
public void close()
HGSearchResultFree all system resources held up by the result set and invalidate it for further use.
close in interface HGSearchResult<HGHandle>public HGHandle 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<HGHandle>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<HGHandle>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<HGHandle>public HGHandle prev()
TwoWayIteratorReturns the previous element in this iteration.
prev in interface TwoWayIterator<HGHandle>public boolean hasNext()
hasNext in interface java.util.Iterator<HGHandle>public HGHandle next()
next in interface java.util.Iterator<HGHandle>public void remove()
remove in interface java.util.Iterator<HGHandle>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||