Interface CloseableIterator<T>

Type Parameters:
T - the type of iterated elements.
All Superinterfaces:
AutoCloseable, Iterator<T>
All Known Implementing Classes:
CloseableIterator.IteratorAdapter

@PublicEvolving public interface CloseableIterator<T> extends Iterator<T>, AutoCloseable
This interface represents an Iterator that is also AutoCloseable. A typical use-case for this interface are iterators that are based on native-resources such as files, network, or database connections. Clients must call AutoCloseable.close() after using the iterator.