org.apache.jackrabbit.commons.iterator
Class NodeIteratorAdapter
java.lang.Object
org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
org.apache.jackrabbit.commons.iterator.NodeIteratorAdapter
- All Implemented Interfaces:
- Iterator, javax.jcr.NodeIterator, javax.jcr.RangeIterator
public class NodeIteratorAdapter
- extends RangeIteratorDecorator
- implements javax.jcr.NodeIterator
Adapter class for turning RangeIterator
s or Iterator
s
into NodeIterator
s.
Field Summary |
static javax.jcr.NodeIterator |
EMPTY
Static instance of an empty NodeIterator . |
Method Summary |
javax.jcr.Node |
nextNode()
Returns the next node. |
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 |
EMPTY
public static final javax.jcr.NodeIterator EMPTY
- Static instance of an empty
NodeIterator
.
NodeIteratorAdapter
public NodeIteratorAdapter(javax.jcr.RangeIterator iterator)
- Creates an adapter for the given
RangeIterator
.
- Parameters:
iterator
- iterator of Node
s
NodeIteratorAdapter
public NodeIteratorAdapter(Iterator iterator)
- Creates an adapter for the given
Iterator
.
- Parameters:
iterator
- iterator of Node
s
NodeIteratorAdapter
public NodeIteratorAdapter(Collection collection)
- Creates an iterator for the given collection.
- Parameters:
collection
- collection of Node
s
nextNode
public javax.jcr.Node nextNode()
throws NoSuchElementException
- Returns the next node.
- Specified by:
nextNode
in interface javax.jcr.NodeIterator
- Returns:
- next node
- Throws:
NoSuchElementException
- if there is no next node
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.