Interface CloseableIterable<T>

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, java.lang.Iterable<T>

    public interface CloseableIterable<T>
    extends java.lang.Iterable<T>, java.io.Closeable
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void forEach​(java.util.function.Consumer<? super T> consumer)
      Consume all values for this iterable with consumer
      • Methods inherited from interface java.io.Closeable

        close
      • Methods inherited from interface java.lang.Iterable

        iterator, spliterator
    • Method Detail

      • forEach

        default void forEach​(java.util.function.Consumer<? super T> consumer)
        Consume all values for this iterable with consumer

        Closeable.close() will be called after all values are passed to consumer.

        Specified by:
        forEach in interface java.lang.Iterable<T>