Package org.apache.commons.io.function
Interface IOIterable<T>
-
- Type Parameters:
T- the type of elements returned by the iterable.
- All Known Implementing Classes:
ReversedLinesFileReader
public interface IOIterable<T>
LikeIterablebut throwsIOException.- Since:
- 2.19.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.Iterable<T>asIterable()Creates anIterablefor this instance that throwsUncheckedIOExceptioninstead ofIOException.default voidforEach(IOConsumer<? super T> action)LikeIterable.iterator().IOIterator<T>iterator()LikeIterable.iterator().default IOSpliterator<T>spliterator()LikeIterable.spliterator().java.lang.Iterable<T>unwrap()Unwraps this instance and returns the underlyingIterable.
-
-
-
Method Detail
-
asIterable
default java.lang.Iterable<T> asIterable()
Creates anIterablefor this instance that throwsUncheckedIOExceptioninstead ofIOException.- Returns:
- an
UncheckedIOExceptionIterable. - Since:
- 2.21.0
-
forEach
default void forEach(IOConsumer<? super T> action) throws java.io.IOException
LikeIterable.iterator().- Parameters:
action- The action to be performed for each element.- Throws:
java.lang.NullPointerException- if the specified action is null.java.io.IOException- thrown by the given action.- See Also:
Iterable.iterator()
-
iterator
IOIterator<T> iterator()
LikeIterable.iterator().- Returns:
- See
delegate. - See Also:
Iterable.iterator()
-
spliterator
default IOSpliterator<T> spliterator()
LikeIterable.spliterator().- Returns:
- See
delegate. - See Also:
Iterable.spliterator()
-
-