Class NodeIteratorAdapter
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- org.apache.jackrabbit.commons.iterator.NodeIteratorAdapter
-
- All Implemented Interfaces:
Iterator
,NodeIterator
,RangeIterator
public class NodeIteratorAdapter extends RangeIteratorDecorator implements NodeIterator
-
-
Field Summary
Fields Modifier and Type Field Description static NodeIterator
EMPTY
Static instance of an emptyNodeIterator
.
-
Constructor Summary
Constructors Constructor Description NodeIteratorAdapter(Collection collection)
Creates an iterator for the given collection.NodeIteratorAdapter(Iterator iterator)
Creates an adapter for the givenIterator
.NodeIteratorAdapter(Iterator iterator, long size)
NodeIteratorAdapter(RangeIterator iterator)
Creates an adapter for the givenRangeIterator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
nextNode()
Returns the next node.-
Methods inherited from class org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
getPosition, getSize, hasNext, next, remove, skip
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Methods inherited from interface javax.jcr.RangeIterator
getPosition, getSize, skip
-
-
-
-
Field Detail
-
EMPTY
public static final NodeIterator EMPTY
Static instance of an emptyNodeIterator
.
-
-
Constructor Detail
-
NodeIteratorAdapter
public NodeIteratorAdapter(RangeIterator iterator)
Creates an adapter for the givenRangeIterator
.- Parameters:
iterator
- iterator ofNode
s
-
NodeIteratorAdapter
public NodeIteratorAdapter(Iterator iterator)
Creates an adapter for the givenIterator
.- Parameters:
iterator
- iterator ofNode
s
-
NodeIteratorAdapter
public NodeIteratorAdapter(Iterator iterator, long size)
-
NodeIteratorAdapter
public NodeIteratorAdapter(Collection collection)
Creates an iterator for the given collection.- Parameters:
collection
- collection ofNode
s
-
-
Method Detail
-
nextNode
public Node nextNode() throws NoSuchElementException
Returns the next node.- Specified by:
nextNode
in interfaceNodeIterator
- Returns:
- next node
- Throws:
NoSuchElementException
- if there is no next node
-
-