|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jackrabbit.iterator.ArrayIterator
org.apache.jackrabbit.iterator.ArrayNodeIterator
Array implementation of the JCR
NodeIterator interface.
| Constructor Summary | |
ArrayNodeIterator(Collection nodes)
Creates an iterator for the given collection of nodes. |
|
ArrayNodeIterator(Node[] nodes)
Creates an iterator for the given array of nodes. |
|
| Method Summary | |
long |
getPosition()
Returns the current array position |
long |
getSize()
Returns the length of the array. |
boolean |
hasNext()
Checks whether there are more elements in the array. |
Object |
next()
Returns the next array element and advances the array position. |
Node |
nextNode()
Returns the next node in the array. |
void |
remove()
Element removal is not supported. |
void |
skip(long items)
Advances the array position the given number of elements. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jcr.RangeIterator |
getPosition, getSize, skip |
| Methods inherited from interface java.util.Iterator |
hasNext, next, remove |
| Constructor Detail |
public ArrayNodeIterator(Node[] nodes)
nodes - the nodes to iteratepublic ArrayNodeIterator(Collection nodes)
nodes - the nodes to iterate| Method Detail |
public Node nextNode()
nextNode in interface NodeIteratorNodeIterator.nextNode()public boolean hasNext()
hasNext in interface Iteratortrue if more elements are available,
false otherwiseIterator#hasNext()public Object next()
next in interface IteratorIterator#next()
public void remove()
throws UnsupportedOperationException
remove in interface IteratorUnsupportedOperationException - always thrownIterator#remove()
public void skip(long items)
throws IllegalArgumentException,
NoSuchElementException
skip in interface RangeIteratoritems - number of items to skip
IllegalArgumentException - if the given number of items is negative
NoSuchElementException - if skipping past the end of the arrayRangeIterator.skip(long)public long getSize()
getSize in interface RangeIteratorRangeIterator.getSize()public long getPosition()
getPosition in interface RangeIteratorRangeIterator.getPosition()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||