public interface CloseableIterable<E> extends Iterable<E>
Iterable
and AutoCloseable
interfaces. This is
useful when you have data that must be iterated on and may hold resources in the underlying implementation that
must be closed.
The close method will close any existing iterators that may be open to free resources
Modifier and Type | Method and Description |
---|---|
void |
close() |
CloseableIterator<E> |
iterator() |
void close()
CloseableIterator<E> iterator()
Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.