Interface ResourceIterator<T>

Type Parameters:
T - type of values returned by this Iterator
All Superinterfaces:
AutoCloseable, Iterator<T>, Resource
All Known Subinterfaces:
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:
  • Field Summary

    Fields inherited from interface org.neo4j.graphdb.Resource

    EMPTY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the iterator early, freeing associated resources It is an error to use the iterator after this has been called.
    default <R> ResourceIterator<R>
    map(Function<T,R> map)
     
    default Stream<T>
     
  • Method Details

    • 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 Resource
    • stream

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

      default <R> ResourceIterator<R> map(Function<T,R> map)