@CleanupObligation public interface CloseableIterable<T> extends Closeable, Iterable<T>
Modifier and Type | Method and Description |
---|---|
void |
close() |
static <T> CloseableIterable<T> |
from(CloseableIterator<T> iterator) |
static <T> CloseableIterable<T> |
from(Iterable<T> it) |
static <T> CloseableIterable<T> |
from(Iterable<T> it,
AutoCloseable close) |
default Stream<T> |
toStream() |
default Stream<T> |
toStream(boolean parallel) |
forEach, iterator, spliterator
@DischargesObligation void close()
close
in interface AutoCloseable
close
in interface Closeable
static <T> CloseableIterable<T> from(CloseableIterator<T> iterator)
static <T> CloseableIterable<T> from(Iterable<T> it)
static <T> CloseableIterable<T> from(Iterable<T> it, AutoCloseable close)
Copyright © 2021 SPF4J. All rights reserved.