org.apache.jackrabbit.commons.iterator
Class NodeIterable

java.lang.Object
  extended by org.apache.jackrabbit.commons.iterator.NodeIterable
All Implemented Interfaces:
java.lang.Iterable<Node>

public class NodeIterable
extends java.lang.Object
implements java.lang.Iterable<Node>

Adapter class that adapts a NodeIterator instance to an Iterable instance that always returns the same underlying iterator.

Since:
Apache Jackrabbit 2.0

Constructor Summary
NodeIterable(NodeIterator iterator)
          Creates an iterable adapter for the given node iterator.
 
Method Summary
 java.util.Iterator<Node> iterator()
          Returns the node iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeIterable

public NodeIterable(NodeIterator iterator)
Creates an iterable adapter for the given node iterator.

Parameters:
iterator - the node iterator to be adapted
Method Detail

iterator

public java.util.Iterator<Node> iterator()
Returns the node iterator.

Specified by:
iterator in interface java.lang.Iterable<Node>
Returns:
node iterator


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.