T - type of stream elementsS - type of stream implementing BaseStreampublic interface BaseStream<T,S extends BaseStream<T,S>>
Stream, IntStream,
etc. Contains methods common to all stream types.| Modifier and Type | Method and Description |
|---|---|
boolean |
isParallel()
Returns whether this stream, when executed, would execute in parallel
(assuming no further modification of the stream, such as appending
further intermediate operations or changing its parallelism).
|
Iterator<T> |
iterator()
Returns an iterator for the elements of this stream.
|
S |
parallel()
Returns an equivalent stream that is parallel.
|
S |
sequential()
Returns an equivalent stream that is sequential.
|
Spliterator<T> |
spliterator()
Returns a spliterator for the elements of this stream.
|
S |
unordered()
Returns an equivalent stream that is
unordered.
|
Iterator<T> iterator()
This is a terminal operation.
Spliterator<T> spliterator()
This is a terminal operation.
boolean isParallel()
true if this stream would execute in parallel if executed
without further modification otherwise falseS sequential()
This is an intermediate operation.
S parallel()
This is an intermediate operation.
S unordered()
This is an intermediate operation.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.
DRAFT internal-0