T
- the element types of the iterable.AutoCloseable
, Iterable<T>
, StreamIterable<T>
public interface CloseableStreamIterable<T> extends StreamIterable<T>, AutoCloseable
StreamIterable
interface to also provide a
AutoCloseable.close()
method for iterables based on streams or other resources
which need to be closed.Modifier and Type | Method | Description |
---|---|---|
CloseableStreamIterator<T> |
iterator() |
|
static <S> CloseableStreamIterable<S> |
of(CloseableStreamIterator<S> iterator) |
This method factory creates a new
StreamIterable out of the provided
StreamIterator . |
close
forEach, spliterator
of
static <S> CloseableStreamIterable<S> of(CloseableStreamIterator<S> iterator)
StreamIterable
out of the provided
StreamIterator
.iterator
- is the iterator to use.CloseableStreamIterator<T> iterator()
Copyright © 2017–2018 PureSol Technologies. All rights reserved.