Package com.adaptris.interlok.util
Interface CloseableIterable<E>
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,java.lang.Iterable<E>
public interface CloseableIterable<E> extends java.io.Closeable, java.lang.Iterable<E>
This Iterable exists for the purpose of being able to iterate over a list of indeterminate size (possibly too large for memory), while still guaranteeing that whatever resource is being held (like a Stream) will be closed when iteration finishes (or it goes out of scope).
-
-
Method Summary
Static Methods Modifier and Type Method Description static <E> CloseableIterable<E>
ensureCloseable(java.lang.Iterable<E> iter)
-
-
-
Method Detail
-
ensureCloseable
static <E> CloseableIterable<E> ensureCloseable(java.lang.Iterable<E> iter)
-
-