Class StreamSupport
java.lang.Object
java.util.stream.StreamSupport
Makes a Stream of a Spliterator: what Collection.stream() does, and
how a library turns any Iterable into a stream
(StreamSupport.stream(iterable.spliterator(), false)).
Streams here run sequentially; parallel is what isParallel()
reports and changes nothing else, which the JDK allows.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Stream<T> stream(Supplier<? extends Spliterator<T>> supplier, int characteristics, boolean parallel) The elements of the spliteratorsupplieranswers when a terminal operation first asks for one.static <T> Stream<T> stream(Spliterator<T> spliterator, boolean parallel) The elements ofspliterator, read when a terminal operation asks for them.
-
Method Details
-
stream
The elements ofspliterator, read when a terminal operation asks for them. -
stream
public static <T> Stream<T> stream(Supplier<? extends Spliterator<T>> supplier, int characteristics, boolean parallel) The elements of the spliteratorsupplieranswers when a terminal operation first asks for one.
-