@Override
    public E next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }

        final E ret = next;

        // pre-fetch the next value. It is important to do this
        // so that the underlying resource can be closed after reading the
        // last value of the iterator.
        tryComputeNext();

        return ret;
    }
Represents if the iterator has been fully consumed
tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphIterator.java