org.apache.tinkerpop.gremlin.tinkergraph.structure

## Class TinkerGraphIterator<E>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraphIterator<E>

- All Implemented Interfaces:
    Closeable, AutoCloseable, Iterator<E>, CloseableIterator<E>

      public class TinkerGraphIterator<E>
      extends Object
      implements CloseableIterator<E>

  Wrapper on top of Iterator representing a closable resource to the underlying storage. This class also serves as a reference on how the providers can maintain a counter of the underlying storage resources in their implementation. This counter in coordination with gremlin-test suite can be used to detect cases when the query processor does not gracefully release the underlying resources.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TinkerGraphIterator(Iterator<E> orig)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `boolean` | `hasNext()`
    `E` | `next()`

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

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

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.structure.util.CloseableIterator

      `asCloseable, closeIterator`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining, remove`

- - ### Constructor Detail

    - #### TinkerGraphIterator

          public TinkerGraphIterator(Iterator<E> orig)

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<E>`

    - #### next

          public E next()

      Specified by:
        `next` in interface `Iterator<E>`

    - #### close

          public void close()

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `CloseableIterator<E>`

Copyright © 2013–2020 Apache Software Foundation. All rights reserved.