Interface Resource.Iterable<T, X extends Exception>
- All Superinterfaces:
AutoCloseable, Iterable<T>, Resource<X>
-
Nested Class Summary
Nested classes/interfaces inherited from interface Resource
Resource.Iterable<T,X>, Resource.Iterator<E, X> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Resource.Iterable<T, RuntimeException> asResource(Iterable<T> iterable) Wrap an iterator with a no-op closestatic <T, X extends Exception>
Resource.Iterable<T, X> asResource(Iterable<T> iterable, ThrowingRunnable<X> onClose) Wrap an iterable with a potentially throwing closeiterator()Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
iterator
-
asResource
Wrap an iterator with a no-op close- See Also:
-
asResource
static <T, X extends Exception> Resource.Iterable<T,X> asResource(Iterable<T> iterable, ThrowingRunnable<X> onClose) Wrap an iterable with a potentially throwing close
-