Top Description Inners Fields Constructors Methods
java.util.stream

pack-priv abstract Class DoublePipeline<E_IN>

extends AbstractPipeline<E_IN, Double, DoubleStream>
implements DoubleStream
Class Inheritance
All Implemented Interfaces
java.util.stream.DoubleStream, java.util.stream.BaseStream, java.lang.AutoCloseable
Known Direct Subclasses
java.util.stream.DoublePipeline.Head, java.util.stream.DoublePipeline.StatelessOp, java.util.stream.DoublePipeline.StatefulOp
Type Parameters
<E_IN>
type of elements in the upstream source
Imports
java.util.DoubleSummaryStatistics, .Objects, .OptionalDouble, .PrimitiveIterator, .Spliterator, .Spliterators, java.util.function.BiConsumer, .BinaryOperator, .DoubleBinaryOperator, .DoubleConsumer, .DoubleFunction, .DoublePredicate, .DoubleToIntFunction, .DoubleToLongFunction, .DoubleUnaryOperator, .IntConsumer, .IntFunction, .ObjDoubleConsumer, .Supplier

Abstract base class for an intermediate pipeline stage or pipeline source stage implementing whose elements are of type double.
Since
1.8

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
DoublePipeline.Head<
type of elements in the upstream source
E_IN
>

Source stage of a DoubleStream

pack-priv abstract static class
DoublePipeline.StatefulOp<
type of elements in the upstream source
E_IN
>

Base class for a stateful intermediate stage of a DoubleStream.

pack-priv abstract static class
DoublePipeline.StatelessOp<
type of elements in the upstream source
E_IN
>

Base class for a stateless intermediate stage of a DoubleStream.

Field Summary

Inherited from java.util.stream.AbstractPipeline:
previousStagesourceOrOpFlags

Constructor Summary

AccessConstructor and Description
pack-priv
DoublePipeline(Supplier<? extends Spliterator<Double>>
Supplier<Spliterator> describing the stream source
source
,
int
the source flags for the stream source, described in StreamOpFlag
sourceFlags
,
boolean parallel)

Constructor for the head of a stream pipeline.

pack-priv
DoublePipeline(Spliterator<Double>
Spliterator describing the stream source
source
,
int
the source flags for the stream source, described in StreamOpFlag
sourceFlags
,
boolean parallel)

Constructor for the head of a stream pipeline.

pack-priv
DoublePipeline(AbstractPipeline<?, E_IN, ?>
the upstream element source.
upstream
,
int
the operation flags
opFlags
)

Constructor for appending an intermediate operation onto an existing pipeline.

Method Summary

Modifier and TypeMethod and Description
private static DoubleConsumer
adapt(Sink<Double> sink)

Adapt a Sink<Double> to a DoubleConsumer, ideally simply by casting.

private static Spliterator.OfDouble
adapt(Spliterator<Double> s)

Adapt a Spliterator<Double> to a Spliterator.OfDouble.

public final boolean
allMatch(DoublePredicate
a non-interfering, stateless predicate to apply to elements of this stream
predicate
)

Implements java.util.stream.DoubleStream.allMatch.

Returns whether all elements of this stream match the provided predicate.

public final boolean
anyMatch(DoublePredicate
a non-interfering, stateless predicate to apply to elements of this stream
predicate
)

Implements java.util.stream.DoubleStream.anyMatch.

Returns whether any elements of this stream match the provided predicate.

public final OptionalDouble
average()

Implements java.util.stream.DoubleStream.average.

Returns an OptionalDouble describing the arithmetic mean of elements of this stream, or an empty optional if this stream is empty.

public final Stream<Double>
boxed()

Implements java.util.stream.DoubleStream.boxed.

Returns a Stream consisting of the elements of this stream, boxed to Double.

public final <R> R
collect(Supplier<R>
a function that creates a new mutable result container. For a parallel execution, this function may be called multiple times and must return a fresh value each time.
supplier
,
ObjDoubleConsumer<R>
an associative, non-interfering, stateless function that must fold an element into a result container.
accumulator
,
BiConsumer<R, R>
an associative, non-interfering, stateless function that accepts two partial result containers and merges them, which must be compatible with the accumulator function. The combiner function must fold the elements from the second result container into the first result container.
combiner
)

Implements java.util.stream.DoubleStream.collect.

Performs a mutable reduction operation on the elements of this stream.

public final long
count()

Implements java.util.stream.DoubleStream.count.

Returns the count of elements in this stream.

public final DoubleStream
distinct()

Implements java.util.stream.DoubleStream.distinct.

Returns a stream consisting of the distinct elements of this stream.

public final DoubleStream
dropWhile(DoublePredicate
a non-interfering, stateless predicate to apply to elements to determine the longest prefix of elements.
predicate
)

Overrides default java.util.stream.DoubleStream.dropWhile.

Returns, if this stream is ordered, a stream consisting of the remaining elements of this stream after dropping the longest prefix of elements that match the given predicate.

pack-priv final <P_IN> Node<Double>
evaluateToNode(PipelineHelper<Double>
the pipeline helper describing the pipeline stages
helper
,
Spliterator<P_IN>
the source spliterator
spliterator
,
boolean
true if the returned node should be flattened
flattenTree
,
IntFunction<Double[]>
the array generator
generator
)

Implements abstract java.util.stream.AbstractPipeline.evaluateToNode.

Collect elements output from a pipeline into a Node that holds elements of this shape.

public final DoubleStream
filter(DoublePredicate
a non-interfering, stateless predicate to apply to each element to determine if it should be included
predicate
)

Implements java.util.stream.DoubleStream.filter.

Returns a stream consisting of the elements of this stream that match the given predicate.

public final OptionalDouble
findAny()

Implements java.util.stream.DoubleStream.findAny.

Returns an OptionalDouble describing some element of the stream, or an empty OptionalDouble if the stream is empty.

public final OptionalDouble
findFirst()

Implements java.util.stream.DoubleStream.findFirst.

Returns an OptionalDouble describing the first element of this stream, or an empty OptionalDouble if the stream is empty.

public final DoubleStream
flatMap(DoubleFunction<? extends DoubleStream>
a non-interfering, stateless function to apply to each element which produces a DoubleStream of new values
mapper
)

Implements java.util.stream.DoubleStream.flatMap.

Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.

public void
forEach(DoubleConsumer
a non-interfering action to perform on the elements
consumer
)

Implements java.util.stream.DoubleStream.forEach.

Performs an action for each element of this stream.

public void
forEachOrdered(DoubleConsumer
a non-interfering action to perform on the elements
consumer
)

Implements java.util.stream.DoubleStream.forEachOrdered.

Performs an action for each element of this stream, guaranteeing that each element is processed in encounter order for streams that have a defined encounter order.

pack-priv final boolean
forEachWithCancel(Spliterator<Double>
the spliterator to pull elements from
spliterator
,
Sink<Double>
the sink to push elements to
sink
)

Implements abstract java.util.stream.AbstractPipeline.forEachWithCancel.

Traverse the elements of a spliterator compatible with this stream shape, pushing those elements into a sink.

pack-priv final StreamShape
getOutputShape()

Implements abstract java.util.stream.AbstractPipeline.getOutputShape.

Get the output shape of the pipeline.

public final PrimitiveIterator.OfDouble
iterator()

Implements java.util.stream.DoubleStream.iterator, java.util.stream.BaseStream.iterator.

Returns an iterator for the elements of this stream.

pack-priv final Spliterator.OfDouble
lazySpliterator(Supplier<? extends Spliterator<Double>>
the supplier of a spliterator
supplier
)

Implements abstract java.util.stream.AbstractPipeline.lazySpliterator.

Create a lazy spliterator that wraps and obtains the supplied the spliterator when a method is invoked on the lazy spliterator.

public final DoubleStream
limit(long
the number of elements the stream should be limited to
maxSize
)

Implements java.util.stream.DoubleStream.limit.

Returns a stream consisting of the elements of this stream, truncated to be no longer than maxSize in length.

pack-priv final Node.Builder<Double>
makeNodeBuilder(long
if >=0, then a node builder will be created that has a fixed capacity of at most sizeIfKnown elements. If < 0, then the node builder has an unfixed capacity. A fixed capacity node builder will throw exceptions if an element is added after builder has reached capacity, or is built before the builder has reached capacity.
exactSizeIfKnown
,
IntFunction<Double[]>
the array generator to be used to create instances of a T[] array. For implementations supporting primitive nodes, this parameter may be ignored.
generator
)

Implements abstract java.util.stream.AbstractPipeline.makeNodeBuilder.

Make a node builder compatible with this stream shape.

public final DoubleStream
map(DoubleUnaryOperator
a non-interfering, stateless function to apply to each element
mapper
)

Implements java.util.stream.DoubleStream.map.

Returns a stream consisting of the results of applying the given function to the elements of this stream.

public final DoubleStream
mapMulti(DoubleStream.DoubleMapMultiConsumer
a non-interfering, stateless function that generates replacement elements
mapper
)

Overrides default java.util.stream.DoubleStream.mapMulti.

Returns a stream consisting of the results of replacing each element of this stream with multiple elements, specifically zero or more elements.

public final IntStream
mapToInt(DoubleToIntFunction
a non-interfering, stateless function to apply to each element
mapper
)

Implements java.util.stream.DoubleStream.mapToInt.

Returns an IntStream consisting of the results of applying the given function to the elements of this stream.

public final LongStream
mapToLong(DoubleToLongFunction
a non-interfering, stateless function to apply to each element
mapper
)

Implements java.util.stream.DoubleStream.mapToLong.

Returns a LongStream consisting of the results of applying the given function to the elements of this stream.

private <U> Stream<U>
mapToObj(DoubleFunction<? extends U> mapper, int opFlags)

public final <U> Stream<U>
mapToObj(DoubleFunction<? extends U>
a non-interfering, stateless function to apply to each element
mapper
)

Implements java.util.stream.DoubleStream.mapToObj.

Returns an object-valued Stream consisting of the results of applying the given function to the elements of this stream.

public final OptionalDouble
max()

Implements java.util.stream.DoubleStream.max.

Returns an OptionalDouble describing the maximum element of this stream, or an empty OptionalDouble if this stream is empty.

public final OptionalDouble
min()

Implements java.util.stream.DoubleStream.min.

Returns an OptionalDouble describing the minimum element of this stream, or an empty OptionalDouble if this stream is empty.

public final boolean
noneMatch(DoublePredicate
a non-interfering, stateless predicate to apply to elements of this stream
predicate
)

Implements java.util.stream.DoubleStream.noneMatch.

Returns whether no elements of this stream match the provided predicate.

public final DoubleStream
peek(DoubleConsumer
a non-interfering action to perform on the elements as they are consumed from the stream
action
)

Implements java.util.stream.DoubleStream.peek.

Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as elements are consumed from the resulting stream.

public final double
reduce(double
the identity value for the accumulating function
identity
,
DoubleBinaryOperator
an associative, non-interfering, stateless function for combining two values
op
)

Implements java.util.stream.DoubleStream.reduce.

Performs a reduction on the elements of this stream, using the provided identity value and an associative accumulation function, and returns the reduced value.

public final OptionalDouble
reduce(DoubleBinaryOperator
an associative, non-interfering, stateless function for combining two values
op
)

Implements java.util.stream.DoubleStream.reduce.

Performs a reduction on the elements of this stream, using an associative accumulation function, and returns an OptionalDouble describing the reduced value, if any.

public final DoubleStream
skip(long
the number of leading elements to skip
n
)

Implements java.util.stream.DoubleStream.skip.

Returns a stream consisting of the remaining elements of this stream after discarding the first n elements of the stream.

public final DoubleStream
sorted()

Implements java.util.stream.DoubleStream.sorted.

Returns a stream consisting of the elements of this stream in sorted order.

public final Spliterator.OfDouble
public final double
sum()

Implements java.util.stream.DoubleStream.sum.

Returns the sum of elements in this stream.

public final DoubleSummaryStatistics
summaryStatistics()

Implements java.util.stream.DoubleStream.summaryStatistics.

Returns a DoubleSummaryStatistics describing various summary data about the elements of this stream.

public final DoubleStream
takeWhile(DoublePredicate
a non-interfering, stateless predicate to apply to elements to determine the longest prefix of elements.
predicate
)

Overrides default java.util.stream.DoubleStream.takeWhile.

Returns, if this stream is ordered, a stream consisting of the longest prefix of elements taken from this stream that match the given predicate.

public final double[]
toArray()

Implements java.util.stream.DoubleStream.toArray.

Returns an array containing the elements of this stream.

public DoubleStream
unordered()

Implements java.util.stream.BaseStream.unordered.

Returns an equivalent stream that is unordered.

pack-priv final <P_IN> Spliterator<Double>
wrap(PipelineHelper<Double>
the pipeline helper describing the pipeline stages
ph
,
Supplier<Spliterator<P_IN>>
the supplier of a spliterator
supplier
,
boolean isParallel)

Implements abstract java.util.stream.AbstractPipeline.wrap.

Create a spliterator that wraps a source spliterator, compatible with this stream shape, and operations associated with a PipelineHelper.

Inherited from java.util.stream.AbstractPipeline:
closecopyIntocopyIntoWithCancelevaluateevaluateevaluateToArrayNodeexactOutputSizeexactOutputSizeIfKnowngetSourceShapegetStreamAndOpFlagsgetStreamFlagshasAnyStatefulisOrderedisParallelisShortCircuitingPipelinelinkOrConsumeonCloseopEvaluateParallelopEvaluateParallelLazyopIsStatefulopWrapSinkparallelsequentialsourceSpliteratorsourceStageSpliteratorwrapAndCopyIntowrapSinkwrapSpliterator