public class StreamUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Stream<T> |
iteratorToStream(Iterator<T> iterator)
Convert an Iterator to a Stream
|
static <T> Stream<T> |
iteratorToStream(Iterator<T> iterator,
Boolean parallel)
Convert an Iterator to a Stream
|
public static <T> Stream<T> iteratorToStream(Iterator<T> iterator)
T
- the type of the Streamiterator
- the iteratorpublic static <T> Stream<T> iteratorToStream(Iterator<T> iterator, Boolean parallel)
T
- the type of the Streamiterator
- the iteratorparallel
- whether to parallelize the streamCopyright © 2013–2018 DuraSpace, Inc.. All rights reserved.