public interface CloseableIteratorCollection<E> extends Collection<E>
CloseableIterator
instead of a non closeable one. This is needed so that iterators can be properly cleaned up. All other
methods will internally clean up any iterators created and don't have other side effects.| Modifier and Type | Method and Description |
|---|---|
CloseableIterator<E> |
iterator() |
default Stream<E> |
parallelStream() |
CloseableSpliterator<E> |
spliterator() |
default Stream<E> |
stream() |
CloseableIterator<E> iterator()
This iterator should be explicitly closed when iteration upon it is completed. Failure to do so could cause resources to not be freed properly
CloseableSpliterator<E> spliterator()
This spliterator should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
spliterator in interface Collection<E>spliterator in interface Iterable<E>default Stream<E> stream()
This stream should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
stream in interface Collection<E>default Stream<E> parallelStream()
This stream should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
parallelStream in interface Collection<E>Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.