public static IntStream intStream(Supplier<? extends Spliterator.OfInt> supplier,
                                      int characteristics,
                                      boolean parallel) {
        return new IntPipeline.Head<>(supplier,
                                      StreamOpFlag.fromCharacteristics(characteristics),
                                      parallel);
    }
public static IntStream intStream ( Supplier < ? extends Spliterator . OfInt > supplier , int characteristics , boolean parallel ) { return new IntPipeline . Head < > ( supplier , StreamOpFlag . fromCharacteristics ( characteristics ) , parallel ) ; }
Creates a new sequential or parallel {@code IntStream} from a
{@code Supplier} of {@code Spliterator.OfInt}.

<p>The {@link Supplier#get()} method will be invoked on the supplier no
more than once, and only after the terminal operation of the stream pipeline
commences.

<p>For spliterators that report a characteristic of {@code IMMUTABLE}
or {@code CONCURRENT}, or that are
<a href="../Spliterator.html#binding">late-binding</a>, it is likely
more efficient to use {@link #intStream(java.util.Spliterator.OfInt, boolean)}
instead.
<p>The use of a {@code Supplier} in this form provides a level of
indirection that reduces the scope of potential interference with the
source.  Since the supplier is only invoked after the terminal operation
commences, any modifications to the source up to the start of the
terminal operation are reflected in the stream result.  See
<a href="package-summary.html#NonInterference">Non-Interference</a> for
more details.

@param supplier a {@code Supplier} of a {@code Spliterator.OfInt}
@param characteristics Spliterator characteristics of the supplied
{@code Spliterator.OfInt}.  The characteristics must be equal to
{@code supplier.get().characteristics()}, otherwise undefined
behavior may occur when terminal operation commences.
@param parallel if {@code true} then the returned stream is a parallel
stream; if {@code false} the returned stream is a sequential
stream.
@return a new sequential or parallel {@code IntStream}
@see #intStream(java.util.Spliterator.OfInt, boolean)