Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public final class StreamSupport

  1. Object
  2. 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.

Methods

public static <T> Stream<T> stream(Spliterator<T> spliterator, boolean parallel)The elements of spliterator, read when a terminal operation asks for them.
public static <T> Stream<T> stream(Supplier<? extends Spliterator<T>> supplier, int characteristics, boolean parallel)The elements of the spliterator supplier answers when a terminal operation first asks for one.

Inherited methods

Method details

stream

public static <T> Stream<T> stream(Spliterator<T> spliterator, boolean parallel)
The elements of spliterator, 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 spliterator supplier answers when a terminal operation first asks for one.