public class NodeIteratorImpl extends Object implements ScoreNodeIterator
NodeIterator returned by
QueryResult.getNodes().| Constructor and Description |
|---|
NodeIteratorImpl(ItemManager itemMgr,
HierarchyManager hierarchyMgr,
org.apache.jackrabbit.spi.QueryInfo queryInfo)
Creates a new
NodeIteratorImpl instance. |
| Modifier and Type | Method and Description |
|---|---|
long |
getPosition()
Returns the current position in this
NodeIterator. |
double |
getScore()
Returns the score of the node returned by
nextNode(). |
long |
getSize()
Returns the number of nodes in this iterator.
|
boolean |
hasNext()
Returns
true if there is another Node
available; false otherwise. |
Object |
next()
Returns the next
Node in the result set. |
Node |
nextNode()
Returns the next
Node in the result set. |
void |
remove() |
void |
skip(long skipNum)
Skip a number of
Nodes in this iterator. |
public NodeIteratorImpl(ItemManager itemMgr, HierarchyManager hierarchyMgr, org.apache.jackrabbit.spi.QueryInfo queryInfo)
NodeIteratorImpl instance.itemMgr - The ItemManager to build Node instances.hierarchyMgr - The HierarchyManager used to retrieve the
HierarchyEntry objects from the ids returned by the query.queryInfo - the query result.public double getScore()
throws NoSuchElementException
nextNode(). In other
words, this method returns the score value of the next Node.getScore in interface ScoreNodeIteratornextNode().NoSuchElementException - if there is no next node.ScoreNodeIterator.getScore()public Node nextNode() throws NoSuchElementException
Node in the result set.nextNode in interface NodeIteratorNode in the result set.NoSuchElementException - if iteration has no more Nodes.NodeIterator.nextNode()public void skip(long skipNum)
throws NoSuchElementException
Nodes in this iterator.skip in interface RangeIteratorskipNum - the non-negative number of Nodes to skipNoSuchElementException - if skipped past the last Node
in this iterator.RangeIterator.skip(long)public long getSize()
getSize in interface RangeIteratorRangeIterator.getSize()public long getPosition()
NodeIterator.getPosition in interface RangeIteratorNodeIterator.RangeIterator.getPosition()public Object next() throws NoSuchElementException
Node in the result set.next in interface IteratorNode in the result set.NoSuchElementException - if iteration has no more Nodes.Iterator.next()public boolean hasNext()
true if there is another Node
available; false otherwise.hasNext in interface Iteratortrue if there is another Node
available; false otherwise.Iterator.hasNext()public void remove()
remove in interface IteratorUnsupportedOperationException - always.Iterator.remove()Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.