TerminalOp that implement
reductions.
| Modifier and Type | Class and Description |
|---|---|
| private static interface | ReduceOps.
the type of input element to the combining operation T, the result type R, the type of the K extends ReduceOps.AccumulatingSink.A type of |
| private abstract static class | ReduceOps.
The type of the state element U>State box for a single state element, used as a base class for
|
| pack-priv abstract static class | |
| private abstract static class | ReduceOps.
the output type of the stream pipeline T, the result type of the reducing operation R, the type of the S extends ReduceOps.AccumulatingSinkA |
| private static class | ReduceOps.
A |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TerminalOp | Returns: aTerminalOp implementing the reductionthe identity for the combining function identity, DoubleBinaryOperator the combining function operator)Constructs a |
| public static TerminalOp | Returns: aTerminalOp implementing the reductionthe combining function operator)Constructs a |
| public static < the type of the result R> TerminalOp | Returns: aTerminalOp implementing the reductiona factory to produce a new accumulator of the result type supplier, ObjDoubleConsumer<R> a function to incorporate an int into an
accumulator accumulator, BinaryOperator<R> a function to combine an accumulator into another combiner)Constructs a |
| public static TerminalOp | Returns: aTerminalOp implementing the countingConstructs a |
| public static TerminalOp | Returns: aTerminalOp implementing the reductionthe identity for the combining function identity, IntBinaryOperator the combining function operator)Constructs a |
| public static TerminalOp | Returns: aTerminalOp implementing the reductionthe combining function operator)Constructs a |
| public static < The type of the result R> TerminalOp | Returns: AReduceOp implementing the reductiona factory to produce a new accumulator of the result type supplier, ObjIntConsumer<R> a function to incorporate an int into an
accumulator accumulator, BinaryOperator<R> a function to combine an accumulator into another combiner)Constructs a |
| public static TerminalOp | Returns: aTerminalOp implementing the countingConstructs a |
| public static TerminalOp | Returns: aTerminalOp implementing the reductionthe identity for the combining function identity, LongBinaryOperator the combining function operator)Constructs a |
| public static TerminalOp | Returns: aTerminalOp implementing the reductionthe combining function operator)Constructs a |
| public static < the type of the result R> TerminalOp | Returns: aTerminalOp implementing the reductiona factory to produce a new accumulator of the result type supplier, ObjLongConsumer<R> a function to incorporate an int into an
accumulator accumulator, BinaryOperator<R> a function to combine an accumulator into another combiner)Constructs a |
| public static TerminalOp | Returns: aTerminalOp implementing the countingConstructs a |
| public static < the type of the input elements T, the type of the result U> TerminalOp | Returns: aTerminalOp implementing the reductionthe identity element for the reduction seed, BiFunction<U, ? super T, U> the accumulating function that incorporates an additional
input element into the result reducer, BinaryOperator<U> the combining function that combines two intermediate
results combiner)Constructs a |
| public static < The type of the input elements, and the type of the result T> TerminalOp | Returns: ATerminalOp implementing the reductionThe reducing function operator)Constructs a |
| public static < the type of the input elements T, the type of the intermediate reduction result I> TerminalOp | |
| public static < the type of the input elements T, the type of the result R> TerminalOp | Returns: aTerminalOp implementing the reductiona factory to produce a new base accumulator seedFactory, BiConsumer<R, ? super T> a function to incorporate an element into an
accumulator accumulator, BiConsumer<R, R> a function to combine an accumulator into another reducer)Constructs a |
| public static < the type of the input elements T> TerminalOp | Returns: aTerminalOp implementing the countingConstructs a |
| ReduceOps | back to summary |
|---|---|
| private ReduceOps() | |
| makeDouble | back to summary |
|---|---|
| public static TerminalOp Constructs a
| |
| makeDouble | back to summary |
|---|---|
| public static TerminalOp Constructs a
| |
| makeDouble | back to summary |
|---|---|
| public static <R> TerminalOp Constructs a
| |
| makeDoubleCounting | back to summary |
|---|---|
| public static TerminalOp Constructs a
| |
| makeInt | back to summary |
|---|---|
| public static TerminalOp Constructs a
| |
| makeInt | back to summary |
|---|---|
| public static TerminalOp Constructs a
| |
| makeInt | back to summary |
|---|---|
| public static <R> TerminalOp Constructs a
| |
| makeIntCounting | back to summary |
|---|---|
| public static TerminalOp Constructs a
| |
| makeLong | back to summary |
|---|---|
| public static TerminalOp Constructs a
| |
| makeLong | back to summary |
|---|---|
| public static TerminalOp Constructs a
| |
| makeLong | back to summary |
|---|---|
| public static <R> TerminalOp Constructs a
| |
| makeLongCounting | back to summary |
|---|---|
| public static TerminalOp Constructs a
| |
| makeRef | back to summary |
|---|---|
| public static <T, U> TerminalOp Constructs a
| |
| makeRef | back to summary |
|---|---|
| public static <T> TerminalOp Constructs a
| |
| makeRef | back to summary |
|---|---|
| public static <T, I> TerminalOp Constructs a
| |
| makeRef | back to summary |
|---|---|
| public static <T, R> TerminalOp Constructs a
| |
| makeRefCounting | back to summary |
|---|---|
| public static <T> TerminalOp Constructs a
| |
AccumulatingSink.
TerminalSink that implements an associative reducing
operation on elements of type T and producing a result of type
R.
| Modifier and Type | Method and Description |
|---|---|
| public void |
| combine | back to summary |
|---|---|
| public void combine(K other) | |
AccumulatingSink instances
| Modifier and Type | Field and Description |
|---|---|
| pack-priv U |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public U |
| state | back to summary |
|---|---|
| pack-priv U state | |
| Box | back to summary |
|---|---|
| pack-priv Box() | |
| get | back to summary |
|---|---|
| public U get() | |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | begin(long size)
Overrides default java. Resets the sink state to receive a fresh data set. |
| public void | combine(ReduceOps.
Implements java.
|
| public Long | get()
Overrides java. Implements java. Gets a result. |
| count | back to summary |
|---|---|
| pack-priv long count | |
| CountingSink | back to summary |
|---|---|
| pack-priv CountingSink() | |
| begin | back to summary |
|---|---|
| public void begin(long size) Overrides default java. Doc from java. Resets the sink state to receive a fresh data set. This must be called
before sending any data to the sink. After calling
| |
| combine | back to summary |
|---|---|
| public void combine(ReduceOps. Implements java.
| |
| get | back to summary |
|---|---|
| public Long get() Overrides java. Implements java. Doc from java. Gets a result.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(double t)
Overrides default java. Implements java. Accepts a double value. |
| OfDouble | back to summary |
|---|---|
| pack-priv OfDouble() | |
| accept | back to summary |
|---|---|
| public void accept(double t) Overrides default java. Implements java. Doc from java. Accepts a double value.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(int t)
Overrides default java. Implements java. Accepts an int value. |
| OfInt | back to summary |
|---|---|
| pack-priv OfInt() | |
| accept | back to summary |
|---|---|
| public void accept(int t) Overrides default java. Implements java. Doc from java. Accepts an int value.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(long t)
Overrides default java. Implements java. Accepts a long value. |
| OfLong | back to summary |
|---|---|
| pack-priv OfLong() | |
| accept | back to summary |
|---|---|
| public void accept(long t) Overrides default java. Implements java. Doc from java. Accepts a long value.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(T t)
Implements java. Performs this operation on the given argument. |
| OfRef | back to summary |
|---|---|
| pack-priv OfRef() | |
| accept | back to summary |
|---|---|
| public void accept(T t) Implements java. Doc from java. Performs this operation on the given argument.
| |
AccumulatingSink
TerminalOp that evaluates a stream pipeline and sends the
output into an AccumulatingSink, which performs a reduce
operation. The AccumulatingSink must represent an associative
reducing operation.
| Modifier and Type | Field and Description |
|---|---|
| private final StreamShape |
| Access | Constructor and Description |
|---|---|
| pack-priv | ReduceOp(StreamShape
The shape of the stream pipeline shape)Create a |
| Modifier and Type | Method and Description |
|---|---|
| public <P_IN> R | evaluateParallel(PipelineHelper<T> helper, Spliterator<P_IN> spliterator)
Overrides default java. Performs a parallel evaluation of the operation using the specified
|
| public <P_IN> R | evaluateSequential(PipelineHelper<T> helper, Spliterator<P_IN> spliterator)
Implements java. Performs a sequential evaluation of the operation using the specified
|
| public StreamShape | inputShape()
Overrides default java. Gets the shape of the input type of this operation. |
| public abstract S |
| inputShape | back to summary |
|---|---|
| private final StreamShape inputShape | |
| ReduceOp | back to summary |
|---|---|
| pack-priv ReduceOp(StreamShape shape) Create a
| |
| evaluateParallel | back to summary |
|---|---|
| public <P_IN> R evaluateParallel(PipelineHelper<T> helper, Spliterator<P_IN> spliterator) Overrides default java. Doc from java. Performs a parallel evaluation of the operation using the specified
| |
| evaluateSequential | back to summary |
|---|---|
| public <P_IN> R evaluateSequential(PipelineHelper<T> helper, Spliterator<P_IN> spliterator) Implements java. Doc from java. Performs a sequential evaluation of the operation using the specified
| |
| inputShape | back to summary |
|---|---|
| public StreamShape inputShape() Overrides default java. Doc from java. Gets the shape of the input type of this operation.
| |
| makeSink | back to summary |
|---|---|
| public abstract S makeSink() | |
ForkJoinTask for performing a parallel reduce operation.
| Access | Constructor and Description |
|---|---|
| pack-priv | ReduceTask(ReduceOps.
|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected S | doLeaf()
Implements abstract java. Computes the result associated with a leaf node. |
| protected ReduceOps. | makeChild(Spliterator<P_IN> spliterator)
Implements abstract java. Constructs a new node of type T whose parent is the receiver; must call the AbstractTask(T, Spliterator) constructor with the receiver and the provided Spliterator. |
| public void | onCompletion(CountedCompleter<?> caller)
Overrides java. Performs an action when method |
| op | back to summary |
|---|---|
| private final ReduceOps. | |
| ReduceTask | back to summary |
|---|---|
| pack-priv ReduceTask(ReduceOps. | |
| ReduceTask | back to summary |
|---|---|
| pack-priv ReduceTask(ReduceOps. | |
| doLeaf | back to summary |
|---|---|
| protected S doLeaf() Implements abstract java. Doc from java. Computes the result associated with a leaf node. Will be called by
| |
| makeChild | back to summary |
|---|---|
| protected ReduceOps. Implements abstract java. Doc from java. Constructs a new node of type T whose parent is the receiver; must call the AbstractTask(T, Spliterator) constructor with the receiver and the provided Spliterator.
| |
| onCompletion | back to summary |
|---|---|
| public void onCompletion(CountedCompleter<?> caller) Overrides java. Doc from java. Performs an action when method
| |