org.neo4j.graphdb

Interface ResourceIterator<T>

  • Type Parameters:
    T - type of values returned by this Iterator
    All Superinterfaces:
    AutoCloseable, Iterator<T>, Resource
    All Known Subinterfaces:
    IndexHits<T>, Result


    public interface ResourceIterator<T>
    extends Iterator<T>, Resource
    Closeable Iterator with associated resources. The associated resources are always released when the owning transaction is committed or rolled back. The resource may also be released eagerly by explicitly calling close() or by exhausting the iterator.
    See Also:
    ResourceIterable
    • Method Detail

      • close

        void close()
        Close the iterator early, freeing associated resources It is an error to use the iterator after this has been called.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Resource
      • stream

        default Stream<T> stream()
        Returns:
        this iterator as a Stream

Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.