public interface CloseableIterator<T> extends Iterator<T>, Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
default void |
closeQuietly()
Unconditionally closes the iterator.
|
default Stream<T> |
stream()
Returns a sequential
Stream with this iterator as its source. |
forEachRemaining, hasNext, next, removevoid close()
close in interface AutoCloseableclose in interface Closeabledefault void closeQuietly()
Unconditionally closes the iterator.
Equivalent to close(), except any exceptions will be ignored.
default Stream<T> stream()
Stream with this iterator as its source. The resulting stream also close the
underlying resource if it BaseStream.close() method is called.Copyright © 2019 Calrissian. All rights reserved.