Package org.fcrepo.kernel.api.utils
Class StreamUtils
- java.lang.Object
-
- org.fcrepo.kernel.api.utils.StreamUtils
-
public class StreamUtils extends Object
- Since:
- February 10, 2016
- Author:
- acoburn
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Stream<T>iteratorToStream(Iterator<T> iterator)Convert an Iterator to a Streamstatic <T> Stream<T>iteratorToStream(Iterator<T> iterator, Boolean parallel)Convert an Iterator to a Stream
-
-
-
Method Detail
-
iteratorToStream
public static <T> Stream<T> iteratorToStream(Iterator<T> iterator)
Convert an Iterator to a Stream- Type Parameters:
T- the type of the Stream- Parameters:
iterator- the iterator- Returns:
- the stream
-
iteratorToStream
public static <T> Stream<T> iteratorToStream(Iterator<T> iterator, Boolean parallel)
Convert an Iterator to a Stream- Type Parameters:
T- the type of the Stream- Parameters:
iterator- the iteratorparallel- whether to parallelize the stream- Returns:
- the stream
-
-