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

Reviewed-by: mduigou
This commit is contained in:
Michael McMahon 2013-12-11 15:26:47 -08:00 committed by Michael McMahon
parent 2d2b14d980
commit ae961f25d4
3 changed files with 6 additions and 6 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>