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, NodeIterator, RangeIterator
public class NodeIteratorAdapter
- extends RangeIteratorDecorator
- implements NodeIterator
Adapter class for turning RangeIterators or Iterators
into NodeIterators.
| 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 |
hasNext, next, remove |
EMPTY
public static final NodeIterator EMPTY
- Static instance of an empty
NodeIterator.
NodeIteratorAdapter
public NodeIteratorAdapter(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 Node nextNode()
throws java.util.NoSuchElementException
- Returns the next node.
- Specified by:
nextNode in interface NodeIterator
- Returns:
- next node
- Throws:
java.util.NoSuchElementException - if there is no next node
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.