public static <T> Stream<T> stream(Spliterator<T> spliterator,
boolean parallel)
Creates a new sequential or parallel
Stream
from a
Spliterator.
public static <T> Stream<T> stream(Supplier<? extends Spliterator<T>> supplier,
int characteristics,
boolean parallel)
Creates a new sequential or parallel
Stream
from a
Supplier
of
Spliterator.
This method also specifies the characteristics of the supplied Spliterator.