8159821: "PrimitiveStream.iterateFinite" methods contain incorrect code sample
Reviewed-by: chegar, briangoetz
--- a/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java Sat May 28 13:57:30 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java Fri Jun 17 10:08:39 2016 -0700
@@ -986,7 +986,7 @@
* {@code DoubleStream.iterate} should produce the same sequence of
* elements as produced by the corresponding for-loop:
* <pre>{@code
- * for (double index=seed; predicate.test(index); index = f.apply(index)) {
+ * for (double index=seed; predicate.test(index); index = f.applyAsDouble(index)) {
* ...
* }
* }</pre>
--- a/jdk/src/java.base/share/classes/java/util/stream/IntStream.java Sat May 28 13:57:30 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/IntStream.java Fri Jun 17 10:08:39 2016 -0700
@@ -926,7 +926,7 @@
* {@code IntStream.iterate} should produce the same sequence of elements
* as produced by the corresponding for-loop:
* <pre>{@code
- * for (int index=seed; predicate.test(index); index = f.apply(index)) {
+ * for (int index=seed; predicate.test(index); index = f.applyAsInt(index)) {
* ...
* }
* }</pre>
--- a/jdk/src/java.base/share/classes/java/util/stream/LongStream.java Sat May 28 13:57:30 2016 +0530
+++ b/jdk/src/java.base/share/classes/java/util/stream/LongStream.java Fri Jun 17 10:08:39 2016 -0700
@@ -916,7 +916,7 @@
* {@code LongStream.iterate} should produce the same sequence of elements
* as produced by the corresponding for-loop:
* <pre>{@code
- * for (long index=seed; predicate.test(index); index = f.apply(index)) {
+ * for (long index=seed; predicate.test(index); index = f.applyAsLong(index)) {
* ...
* }
* }</pre>