Modifier and Type | Method and Description |
---|---|
static <T> java.util.stream.Stream<T> |
createStreamFromIterator(Iterator<T> iterator)
|
public static <T> java.util.stream.Stream<T> createStreamFromIterator(Iterator<T> iterator)
Stream
backed by the given Iterator
.
If the given iterator is an CloseableIterator
add a CloseableIteratorDisposingRunnable
wrapping the
given iterator to propagate BaseStream.close()
accordingly.
iterator
- must not be nullCopyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.