8029944: Primitive Stream reduce method documentation pseudo code misidentifies apply method
Reviewed-by: mduigou
This commit is contained in:
parent
2d2b14d980
commit
ae961f25d4
@ -330,7 +330,7 @@ public interface DoubleStream extends BaseStream<Double, DoubleStream> {
|
||||
* <pre>{@code
|
||||
* double result = identity;
|
||||
* for (double element : this stream)
|
||||
* result = accumulator.apply(result, element)
|
||||
* result = accumulator.applyAsDouble(result, element)
|
||||
* return result;
|
||||
* }</pre>
|
||||
*
|
||||
@ -391,7 +391,7 @@ public interface DoubleStream extends BaseStream<Double, DoubleStream> {
|
||||
* result = element;
|
||||
* }
|
||||
* else
|
||||
* result = accumulator.apply(result, element);
|
||||
* result = accumulator.applyAsDouble(result, element);
|
||||
* }
|
||||
* return foundAny ? OptionalDouble.of(result) : OptionalDouble.empty();
|
||||
* }</pre>
|
||||
|
@ -323,7 +323,7 @@ public interface IntStream extends BaseStream<Integer, IntStream> {
|
||||
* <pre>{@code
|
||||
* int result = identity;
|
||||
* for (int element : this stream)
|
||||
* result = accumulator.apply(result, element)
|
||||
* result = accumulator.applyAsInt(result, element)
|
||||
* return result;
|
||||
* }</pre>
|
||||
*
|
||||
@ -384,7 +384,7 @@ public interface IntStream extends BaseStream<Integer, IntStream> {
|
||||
* result = element;
|
||||
* }
|
||||
* else
|
||||
* result = accumulator.apply(result, element);
|
||||
* result = accumulator.applyAsInt(result, element);
|
||||
* }
|
||||
* return foundAny ? OptionalInt.of(result) : OptionalInt.empty();
|
||||
* }</pre>
|
||||
|
@ -328,7 +328,7 @@ public interface LongStream extends BaseStream<Long, LongStream> {
|
||||
* <pre>{@code
|
||||
* long result = identity;
|
||||
* for (long element : this stream)
|
||||
* result = accumulator.apply(result, element)
|
||||
* result = accumulator.applyAsLong(result, element)
|
||||
* return result;
|
||||
* }</pre>
|
||||
*
|
||||
@ -389,7 +389,7 @@ public interface LongStream extends BaseStream<Long, LongStream> {
|
||||
* result = element;
|
||||
* }
|
||||
* else
|
||||
* result = accumulator.apply(result, element);
|
||||
* result = accumulator.applyAsLong(result, element);
|
||||
* }
|
||||
* return foundAny ? OptionalLong.of(result) : OptionalLong.empty();
|
||||
* }</pre>
|
||||
|
Loading…
x
Reference in New Issue
Block a user