APIdia Launch Partner
Top Description Inners Fields Constructors Methods
java.util.stream

pack-priv abstract Class IntPipeline<E_IN>

extends AbstractPipeline<E_IN, Integer, IntStream>
implements IntStream
Class Inheritance
All Implemented Interfaces
java.util.stream.IntStream, java.util.stream.BaseStream, java.lang.AutoCloseable
Known Direct Subclasses
java.util.stream.IntPipeline.Head, java.util.stream.IntPipeline.StatelessOp, java.util.stream.IntPipeline.StatefulOp
Type Parameters
<E_IN>
type of elements in the upstream source
Imports
java.util.IntSummaryStatistics, .Objects, .OptionalDouble, .OptionalInt, .PrimitiveIterator, .Spliterator, .Spliterators, java.util.function.BiConsumer, .BinaryOperator, .IntBinaryOperator, .IntConsumer, .IntFunction, .IntPredicate, .IntToDoubleFunction, .IntToLongFunction, .IntUnaryOperator, .ObjIntConsumer, .Supplier

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

Nested and Inner Type Summary

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

Source stage of an IntStream.

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

Base class for a stateful intermediate stage of an IntStream.

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

Base class for a stateless intermediate stage of an IntStream

Field Summary

Inherited from java.util.stream.AbstractPipeline:
previousStagesourceOrOpFlags

Constructor Summary

AccessConstructor and Description
pack-priv
IntPipeline(Supplier<? extends Spliterator<Integer>>
Supplier<Spliterator> describing the stream source
source
,
int
The source flags for the stream source, described in StreamOpFlag
sourceFlags
,
boolean
true if the pipeline is parallel
parallel
)

Constructor for the head of a stream pipeline.

pack-priv
IntPipeline(Spliterator<Integer>
Spliterator describing the stream source
source
,
int
The source flags for the stream source, described in StreamOpFlag
sourceFlags
,
boolean
true if the pipeline is parallel
parallel
)

Constructor for the head of a stream pipeline.

pack-priv
IntPipeline(AbstractPipeline<?, E_IN, ?>
the upstream element source
upstream
,
int
the operation flags for the new operation
opFlags
)

Constructor for appending an intermediate operation onto an existing pipeline.

Method Summary

Modifier and TypeMethod and Description
private static IntConsumer
adapt(Sink<Integer> sink)

Adapt a Sink<Integer> to an IntConsumer, ideally simply by casting.

private static Spliterator.OfInt
adapt(Spliterator<Integer> s)

Adapt a Spliterator<Integer> to a Spliterator.OfInt.

public final boolean
allMatch(IntPredicate predicate)

Implements java.util.stream.IntStream.allMatch.

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

public final boolean
anyMatch(IntPredicate predicate)

Implements java.util.stream.IntStream.anyMatch.

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

public final DoubleStream
asDoubleStream()

Implements java.util.stream.IntStream.asDoubleStream.

Returns a DoubleStream consisting of the elements of this stream, converted to double.

public final LongStream
asLongStream()

Implements java.util.stream.IntStream.asLongStream.

Returns a LongStream consisting of the elements of this stream, converted to long.

public final OptionalDouble
average()

Implements java.util.stream.IntStream.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<Integer>
boxed()

Implements java.util.stream.IntStream.boxed.

Returns a Stream consisting of the elements of this stream, each boxed to an Integer.

public final <R> R
collect(Supplier<R> supplier, ObjIntConsumer<R> accumulator, BiConsumer<R, R> combiner)

Implements java.util.stream.IntStream.collect.

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

public final long
count()

Implements java.util.stream.IntStream.count.

Returns the count of elements in this stream.

public final IntStream
distinct()

Implements java.util.stream.IntStream.distinct.

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

public final IntStream
dropWhile(IntPredicate predicate)

Overrides default java.util.stream.IntStream.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<Integer>
evaluateToNode(PipelineHelper<Integer> helper, Spliterator<P_IN> spliterator, boolean flattenTree, IntFunction<Integer[]> 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 IntStream
filter(IntPredicate predicate)

Implements java.util.stream.IntStream.filter.

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

public final OptionalInt
findAny()

Implements java.util.stream.IntStream.findAny.

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

public final OptionalInt
findFirst()

Implements java.util.stream.IntStream.findFirst.

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

public final IntStream
flatMap(IntFunction<? extends IntStream> mapper)

Implements java.util.stream.IntStream.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(IntConsumer action)

Implements java.util.stream.IntStream.forEach.

Performs an action for each element of this stream.

public void
forEachOrdered(IntConsumer action)

Implements java.util.stream.IntStream.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<Integer> spliterator, Sink<Integer> 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.OfInt
iterator()

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

Returns an iterator for the elements of this stream.

pack-priv final Spliterator.OfInt
lazySpliterator(Supplier<? extends Spliterator<Integer>> 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 IntStream
limit(long maxSize)

Implements java.util.stream.IntStream.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<Integer>
makeNodeBuilder(long exactSizeIfKnown, IntFunction<Integer[]> generator)

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

Make a node builder compatible with this stream shape.

public final IntStream
map(IntUnaryOperator mapper)

Implements java.util.stream.IntStream.map.

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

public final IntStream
mapMulti(IntStream.IntMapMultiConsumer mapper)

Overrides default java.util.stream.IntStream.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 DoubleStream
mapToDouble(IntToDoubleFunction mapper)

Implements java.util.stream.IntStream.mapToDouble.

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

public final LongStream
mapToLong(IntToLongFunction mapper)

Implements java.util.stream.IntStream.mapToLong.

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

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

public final <U> Stream<U>
mapToObj(IntFunction<? extends U> mapper)

Implements java.util.stream.IntStream.mapToObj.

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

public final OptionalInt
max()

Implements java.util.stream.IntStream.max.

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

public final OptionalInt
min()

Implements java.util.stream.IntStream.min.

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

public final boolean
noneMatch(IntPredicate predicate)

Implements java.util.stream.IntStream.noneMatch.

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

public final IntStream
peek(IntConsumer action)

Implements java.util.stream.IntStream.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 int
reduce(int identity, IntBinaryOperator op)

Implements java.util.stream.IntStream.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 OptionalInt
reduce(IntBinaryOperator op)

Implements java.util.stream.IntStream.reduce.

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

public final IntStream
skip(long n)

Implements java.util.stream.IntStream.skip.

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

public final IntStream
sorted()

Implements java.util.stream.IntStream.sorted.

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

public final Spliterator.OfInt
public final int
sum()

Implements java.util.stream.IntStream.sum.

Returns the sum of elements in this stream.

public final IntSummaryStatistics
summaryStatistics()

Implements java.util.stream.IntStream.summaryStatistics.

Returns an IntSummaryStatistics describing various summary data about the elements of this stream.

public final IntStream
takeWhile(IntPredicate predicate)

Overrides default java.util.stream.IntStream.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 int[]
toArray()

Implements java.util.stream.IntStream.toArray.

Returns an array containing the elements of this stream.

public IntStream
unordered()

Implements java.util.stream.BaseStream.unordered.

Returns an equivalent stream that is unordered.

pack-priv final <P_IN> Spliterator<Integer>
wrap(PipelineHelper<Integer> ph, Supplier<Spliterator<P_IN>> 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