PositionedIterator (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PositionedIterator(Iterator<? extends T> iterator)` Creates an instance of the class, wrapping iterator

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `current()` Returns the current node.
    `boolean` | `hasNext()`
    `T` | `next()`
    `void` | `remove()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PositionedIterator

          public PositionedIterator(Iterator<? extends T> iterator)

      Creates an instance of the class, wrapping iterator
      Parameters:
        `iterator` - The iterator to wrap

  - ### Method Detail

    - #### 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–2014 The Neo4j Graph Database Project. All rights reserved.