# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods | Inherited Methods

# StreamSupport

`public final class StreamSupport`
`extends Object` ``

java.lang.Object
↳ | java.util.stream.StreamSupport

Low-level utility methods for creating and manipulating streams.

This class is mostly for library writers presenting stream views of data structures; most static stream methods intended for end users are in the various `Stream` classes.

## Summary

### Public methods
`static DoubleStream` | `doubleStream(Spliterator.OfDouble spliterator, boolean parallel)` Creates a new sequential or parallel `DoubleStream` from a `Spliterator.OfDouble`.
`static DoubleStream` | `doubleStream(Supplier<? extends Spliterator.OfDouble> supplier, int characteristics, boolean parallel)` Creates a new sequential or parallel `DoubleStream` from a `Supplier` of `Spliterator.OfDouble`.
`static IntStream` | `intStream(Spliterator.OfInt spliterator, boolean parallel)` Creates a new sequential or parallel `IntStream` from a `Spliterator.OfInt`.
`static IntStream` | `intStream(Supplier<? extends Spliterator.OfInt> supplier, int characteristics, boolean parallel)` Creates a new sequential or parallel `IntStream` from a `Supplier` of `Spliterator.OfInt`.
`static LongStream` | `longStream(Spliterator.OfLong spliterator, boolean parallel)` Creates a new sequential or parallel `LongStream` from a `Spliterator.OfLong`.
`static LongStream` | `longStream(Supplier<? extends Spliterator.OfLong> supplier, int characteristics, boolean parallel)` Creates a new sequential or parallel `LongStream` from a `Supplier` of `Spliterator.OfLong`.
`static <T> Stream<T>` | `stream(Spliterator<T> spliterator, boolean parallel)` Creates a new sequential or parallel `Stream` from a `Spliterator`.
`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`.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public methods

### doubleStream

    public static DoubleStream doubleStream (Spliterator.OfDouble spliterator,
                    boolean parallel)

Creates a new sequential or parallel `DoubleStream` from a `Spliterator.OfDouble`.

The spliterator is only traversed, split, or queried for estimated size after the terminal operation of the stream pipeline commences.

It is strongly recommended the spliterator report a characteristic of `IMMUTABLE` or `CONCURRENT`, or be late-binding. Otherwise, `doubleStream(java.util.function.Supplier, int, boolean)` should be used to reduce the scope of potential interference with the source. See Non-Interference for more details.

Parameters
`spliterator` | `Spliterator.OfDouble`: A `Spliterator.OfDouble` describing the stream elements
`parallel` | `boolean`: if `true` then the returned stream is a parallel stream; if `false` the returned stream is a sequential stream.

Returns
`DoubleStream` | a new sequential or parallel `DoubleStream`

### doubleStream

    public static DoubleStream doubleStream (Supplier<? extends Spliterator.OfDouble> supplier,
                    int characteristics,
                    boolean parallel)

Creates a new sequential or parallel `DoubleStream` from a `Supplier` of `Spliterator.OfDouble`.

The `Supplier#get()` method will be invoked on the supplier no more than once, and only after the terminal operation of the stream pipeline commences.

For spliterators that report a characteristic of `IMMUTABLE` or `CONCURRENT`, or that are late-binding, it is likely more efficient to use `doubleStream(java.util.Spliterator.OfDouble, boolean)` instead.

The use of a `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 Non-Interference for more details.

Parameters
`supplier` | `Supplier`: A `Supplier` of a `Spliterator.OfDouble`
`characteristics` | `int`: Spliterator characteristics of the supplied `Spliterator.OfDouble`. The characteristics must be equal to `supplier.get().characteristics()`, otherwise undefined behavior may occur when terminal operation commences.
`parallel` | `boolean`: if `true` then the returned stream is a parallel stream; if `false` the returned stream is a sequential stream.

Returns
`DoubleStream` | a new sequential or parallel `DoubleStream`

See also:

- `doubleStream(java.util.Spliterator.OfDouble, boolean)`

### intStream

    public static IntStream intStream (Spliterator.OfInt spliterator,
                    boolean parallel)

Creates a new sequential or parallel `IntStream` from a `Spliterator.OfInt`.

The spliterator is only traversed, split, or queried for estimated size after the terminal operation of the stream pipeline commences.

It is strongly recommended the spliterator report a characteristic of `IMMUTABLE` or `CONCURRENT`, or be late-binding. Otherwise, `intStream(java.util.function.Supplier, int, boolean)` should be used to reduce the scope of potential interference with the source. See Non-Interference for more details.

Parameters
`spliterator` | `Spliterator.OfInt`: a `Spliterator.OfInt` describing the stream elements
`parallel` | `boolean`: if `true` then the returned stream is a parallel stream; if `false` the returned stream is a sequential stream.

Returns
`IntStream` | a new sequential or parallel `IntStream`

### intStream

    public static IntStream intStream (Supplier<? extends Spliterator.OfInt> supplier,
                    int characteristics,
                    boolean parallel)

Creates a new sequential or parallel `IntStream` from a `Supplier` of `Spliterator.OfInt`.

The `Supplier#get()` method will be invoked on the supplier no more than once, and only after the terminal operation of the stream pipeline commences.

For spliterators that report a characteristic of `IMMUTABLE` or `CONCURRENT`, or that are late-binding, it is likely more efficient to use `intStream(java.util.Spliterator.OfInt, boolean)` instead.

The use of a `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 Non-Interference for more details.

Parameters
`supplier` | `Supplier`: a `Supplier` of a `Spliterator.OfInt`
`characteristics` | `int`: Spliterator characteristics of the supplied `Spliterator.OfInt`. The characteristics must be equal to `supplier.get().characteristics()`, otherwise undefined behavior may occur when terminal operation commences.
`parallel` | `boolean`: if `true` then the returned stream is a parallel stream; if `false` the returned stream is a sequential stream.

Returns
`IntStream` | a new sequential or parallel `IntStream`

See also:

- `intStream(java.util.Spliterator.OfInt, boolean)`

### longStream

    public static LongStream longStream (Spliterator.OfLong spliterator,
                    boolean parallel)

Creates a new sequential or parallel `LongStream` from a `Spliterator.OfLong`.

The spliterator is only traversed, split, or queried for estimated size after the terminal operation of the stream pipeline commences.

It is strongly recommended the spliterator report a characteristic of `IMMUTABLE` or `CONCURRENT`, or be late-binding. Otherwise, `longStream(java.util.function.Supplier, int, boolean)` should be used to reduce the scope of potential interference with the source. See Non-Interference for more details.

Parameters
`spliterator` | `Spliterator.OfLong`: a `Spliterator.OfLong` describing the stream elements
`parallel` | `boolean`: if `true` then the returned stream is a parallel stream; if `false` the returned stream is a sequential stream.

Returns
`LongStream` | a new sequential or parallel `LongStream`

### longStream

    public static LongStream longStream (Supplier<? extends Spliterator.OfLong> supplier,
                    int characteristics,
                    boolean parallel)

Creates a new sequential or parallel `LongStream` from a `Supplier` of `Spliterator.OfLong`.

The `Supplier#get()` method will be invoked on the supplier no more than once, and only after the terminal operation of the stream pipeline commences.

For spliterators that report a characteristic of `IMMUTABLE` or `CONCURRENT`, or that are late-binding, it is likely more efficient to use `longStream(java.util.Spliterator.OfLong, boolean)` instead.

The use of a `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 Non-Interference for more details.

Parameters
`supplier` | `Supplier`: a `Supplier` of a `Spliterator.OfLong`
`characteristics` | `int`: Spliterator characteristics of the supplied `Spliterator.OfLong`. The characteristics must be equal to `supplier.get().characteristics()`, otherwise undefined behavior may occur when terminal operation commences.
`parallel` | `boolean`: if `true` then the returned stream is a parallel stream; if `false` the returned stream is a sequential stream.

Returns
`LongStream` | a new sequential or parallel `LongStream`

See also:

- `longStream(java.util.Spliterator.OfLong, boolean)`

### stream

    public static Stream<T> stream (Spliterator<T> spliterator,
                    boolean parallel)

Creates a new sequential or parallel `Stream` from a `Spliterator`.

The spliterator is only traversed, split, or queried for estimated size after the terminal operation of the stream pipeline commences.

It is strongly recommended the spliterator report a characteristic of `IMMUTABLE` or `CONCURRENT`, or be late-binding. Otherwise, `stream(java.util.function.Supplier, int, boolean)` should be used to reduce the scope of potential interference with the source. See Non-Interference for more details.

Parameters
`spliterator` | `Spliterator`: a `Spliterator` describing the stream elements
`parallel` | `boolean`: if `true` then the returned stream is a parallel stream; if `false` the returned stream is a sequential stream.

Returns
`Stream<T>` | a new sequential or parallel `Stream`

### stream

    public static Stream<T> stream (Supplier<? extends Spliterator<T>> supplier,
                    int characteristics,
                    boolean parallel)

Creates a new sequential or parallel `Stream` from a `Supplier` of `Spliterator`.

The `Supplier#get()` method will be invoked on the supplier no more than once, and only after the terminal operation of the stream pipeline commences.

For spliterators that report a characteristic of `IMMUTABLE` or `CONCURRENT`, or that are late-binding, it is likely more efficient to use `stream(java.util.Spliterator, boolean)` instead.

The use of a `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 Non-Interference for more details.

Parameters
`supplier` | `Supplier`: a `Supplier` of a `Spliterator`
`characteristics` | `int`: Spliterator characteristics of the supplied `Spliterator`. The characteristics must be equal to `supplier.get().characteristics()`, otherwise undefined behavior may occur when terminal operation commences.
`parallel` | `boolean`: if `true` then the returned stream is a parallel stream; if `false` the returned stream is a sequential stream.

Returns
`Stream<T>` | a new sequential or parallel `Stream`

See also:

- `stream(java.util.Spliterator, boolean)`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*