Interface IOIterable<T>

  • Type Parameters:
    T - the type of elements returned by the iterable.
    All Known Implementing Classes:
    ReversedLinesFileReader

    public interface IOIterable<T>
    Like Iterable but throws IOException.
    Since:
    2.19.0
    • Method Detail

      • asIterable

        default java.lang.Iterable<TasIterable()
        Creates an Iterable for this instance that throws UncheckedIOException instead of IOException.
        Returns:
        an UncheckedIOException Iterable.
        Since:
        2.21.0
      • forEach

        default void forEach​(IOConsumer<? super T> action)
                      throws java.io.IOException
        Like Iterable.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<Titerator()
        Like Iterable.iterator().
        Returns:
        See delegate.
        See Also:
        Iterable.iterator()
      • spliterator

        default IOSpliterator<Tspliterator()
        Like Iterable.spliterator().
        Returns:
        See delegate.
        See Also:
        Iterable.spliterator()
      • unwrap

        java.lang.Iterable<Tunwrap()
        Unwraps this instance and returns the underlying Iterable.

        Implementations may not have anything to unwrap and that behavior is undefined for now.

        Returns:
        the underlying Iterable.