Interface CloseableIterator<T>

All Superinterfaces:
AutoCloseable, Closeable, Iterator<T>
All Known Implementing Classes:
EmptyCloseableIterator, IteratorAdapter

public interface CloseableIterator<T> extends Iterator<T>, Closeable
Iterator with Closeable
Version:
$Id$
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this iterator and releases any system resources associated with it.

    Methods inherited from interface java.util.Iterator

    forEachRemaining, hasNext, next, remove
  • Method Details

    • close

      void close()
      Closes this iterator and releases any system resources associated with it. If the iterator is already closed then invoking this method has no effect.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable