Class NodeIteratorAdapter
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- org.apache.jackrabbit.commons.iterator.NodeIteratorAdapter
-
- All Implemented Interfaces:
java.util.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(java.util.Collection collection)
Creates an iterator for the given collection.NodeIteratorAdapter(java.util.Iterator iterator)
Creates an adapter for the givenIterator
.NodeIteratorAdapter(java.util.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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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(java.util.Iterator iterator)
Creates an adapter for the givenIterator
.- Parameters:
iterator
- iterator ofNode
s
-
NodeIteratorAdapter
public NodeIteratorAdapter(java.util.Iterator iterator, long size)
-
NodeIteratorAdapter
public NodeIteratorAdapter(java.util.Collection collection)
Creates an iterator for the given collection.- Parameters:
collection
- collection ofNode
s
-
-
Method Detail
-
nextNode
public Node nextNode() throws java.util.NoSuchElementException
Returns the next node.- Specified by:
nextNode
in interfaceNodeIterator
- Returns:
- next node
- Throws:
java.util.NoSuchElementException
- if there is no next node
-
-