提交 0bf9c97b 编写于 作者: M michaelm

8029944: Primitive Stream reduce method documentation pseudo code misidentifies apply method

Reviewed-by: mduigou
Contributed-by: michael.mcmahon@oracle.com
上级 ad3c3aa6
......@@ -329,7 +329,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>
*
......@@ -390,7 +390,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>
......
......@@ -322,7 +322,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>
*
......@@ -383,7 +383,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>
......
......@@ -327,7 +327,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>
*
......@@ -388,7 +388,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>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册