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:
- java.util.Iterator, javax.jcr.NodeIterator, javax.jcr.RangeIterator
public class NodeIteratorAdapter
- extends RangeIteratorDecorator
- implements javax.jcr.NodeIterator
Adapter class for turning RangeIterators or Iterators
into NodeIterators.
|
Field Summary |
static javax.jcr.NodeIterator |
EMPTY
Static instance of an empty NodeIterator. |
|
Constructor Summary |
NodeIteratorAdapter(java.util.Collection collection)
Creates an iterator for the given collection. |
NodeIteratorAdapter(java.util.Iterator iterator)
Creates an adapter for the given Iterator. |
NodeIteratorAdapter(javax.jcr.RangeIterator iterator)
Creates an adapter for the given RangeIterator. |
|
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 |
| Methods inherited from interface java.util.Iterator |
hasNext, next, remove |
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 Nodes
NodeIteratorAdapter
public NodeIteratorAdapter(java.util.Iterator iterator)
- Creates an adapter for the given
Iterator.
- Parameters:
iterator - iterator of Nodes
NodeIteratorAdapter
public NodeIteratorAdapter(java.util.Collection collection)
- Creates an iterator for the given collection.
- Parameters:
collection - collection of Nodes
nextNode
public javax.jcr.Node nextNode()
throws java.util.NoSuchElementException
- Returns the next node.
- Specified by:
nextNode in interface javax.jcr.NodeIterator
- Returns:
- next node
- Throws:
java.util.NoSuchElementException - if there is no next node
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.