public abstract class StreamUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Collector<T,?,ArrayDeque<T>> |
collectToDequeue()
A stream collecetor to a ArrayDeque type
|
static Stream<String> |
rowsOfUrl(URL url)
Returns a stream of lines form URL resource
|
static <T> Stream<T> |
toStream(Iterator<T> iterator)
Convert an interator to a Stream
|
static <T> Stream<T> |
toStream(Iterator<T> iterator,
boolean parallel)
Convert an interator to a Stream
|
public static Stream<String> rowsOfUrl(@Nonnull URL url) throws IOException
url - An URL link to a resourceIOExceptionpublic static <T> Stream<T> toStream(@Nonnull Iterator<T> iterator)
T - An item typeiterator - Source iteratorpublic static <T> Stream<T> toStream(@Nonnull Iterator<T> iterator, boolean parallel)
T - An item typeiterator - Source iteratorparallel - Parrallell processing is enabled@Nonnull public static <T> Collector<T,?,ArrayDeque<T>> collectToDequeue()
Copyright 2015, Pavel Ponec