org.neo4j.helpers.collection
Class PositionedIterator<T>
java.lang.Object
org.neo4j.helpers.collection.PositionedIterator<T>
- All Implemented Interfaces:
- Iterator<T>
public class PositionedIterator<T>
- extends Object
- implements Iterator<T>
Decorator class that wraps any iterator and remembers the current node.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PositionedIterator
public PositionedIterator(Iterator<? extends T> iterator)
- Creates an instance of the class, wrapping iterator
- Parameters:
iterator
- The iterator to wrap
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<T>
next
public T next()
- Specified by:
next
in interface Iterator<T>
remove
public void remove()
- Specified by:
remove
in interface Iterator<T>
current
public T current()
- Returns the current node. Any subsequent calls to current will return the same object,
unless the next() method has been called.
- Returns:
- The current node.
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.