提交 f6445b5a 编写于 作者: P psandoz

8028516: Java doc error in Int/Long/Double/Stream.peek

Reviewed-by: chegar
上级 cadbb7fa
...@@ -207,12 +207,12 @@ public interface DoubleStream extends BaseStream<Double, DoubleStream> { ...@@ -207,12 +207,12 @@ public interface DoubleStream extends BaseStream<Double, DoubleStream> {
* @apiNote This method exists mainly to support debugging, where you want * @apiNote This method exists mainly to support debugging, where you want
* to see the elements as they flow past a certain point in a pipeline: * to see the elements as they flow past a certain point in a pipeline:
* <pre>{@code * <pre>{@code
* list.stream() * DoubleStream.of(1, 2, 3, 4)
* .filter(filteringFunction) * .filter(e -> e > 2)
* .peek(e -> System.out.println("Filtered value: " + e)); * .peek(e -> System.out.println("Filtered value: " + e))
* .map(mappingFunction) * .map(e -> e * e)
* .peek(e -> System.out.println("Mapped value: " + e)); * .peek(e -> System.out.println("Mapped value: " + e))
* .collect(Collectors.toDoubleSummaryStastistics()); * .sum();
* }</pre> * }</pre>
* *
* @param action a <a href="package-summary.html#NonInterference"> * @param action a <a href="package-summary.html#NonInterference">
......
...@@ -200,12 +200,12 @@ public interface IntStream extends BaseStream<Integer, IntStream> { ...@@ -200,12 +200,12 @@ public interface IntStream extends BaseStream<Integer, IntStream> {
* @apiNote This method exists mainly to support debugging, where you want * @apiNote This method exists mainly to support debugging, where you want
* to see the elements as they flow past a certain point in a pipeline: * to see the elements as they flow past a certain point in a pipeline:
* <pre>{@code * <pre>{@code
* list.stream() * IntStream.of(1, 2, 3, 4)
* .filter(filteringFunction) * .filter(e -> e > 2)
* .peek(e -> System.out.println("Filtered value: " + e)); * .peek(e -> System.out.println("Filtered value: " + e))
* .map(mappingFunction) * .map(e -> e * e)
* .peek(e -> System.out.println("Mapped value: " + e)); * .peek(e -> System.out.println("Mapped value: " + e))
* .collect(Collectors.toIntSummaryStastistics()); * .sum();
* }</pre> * }</pre>
* *
* @param action a <a href="package-summary.html#NonInterference"> * @param action a <a href="package-summary.html#NonInterference">
......
...@@ -205,12 +205,12 @@ public interface LongStream extends BaseStream<Long, LongStream> { ...@@ -205,12 +205,12 @@ public interface LongStream extends BaseStream<Long, LongStream> {
* @apiNote This method exists mainly to support debugging, where you want * @apiNote This method exists mainly to support debugging, where you want
* to see the elements as they flow past a certain point in a pipeline: * to see the elements as they flow past a certain point in a pipeline:
* <pre>{@code * <pre>{@code
* list.stream() * LongStream.of(1, 2, 3, 4)
* .filter(filteringFunction) * .filter(e -> e > 2)
* .peek(e -> System.out.println("Filtered value: " + e)); * .peek(e -> System.out.println("Filtered value: " + e))
* .map(mappingFunction) * .map(e -> e * e)
* .peek(e -> System.out.println("Mapped value: " + e)); * .peek(e -> System.out.println("Mapped value: " + e))
* .collect(Collectors.toLongSummaryStastistics()); * .sum();
* }</pre> * }</pre>
* *
* @param action a <a href="package-summary.html#NonInterference"> * @param action a <a href="package-summary.html#NonInterference">
......
...@@ -403,12 +403,12 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> { ...@@ -403,12 +403,12 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> {
* @apiNote This method exists mainly to support debugging, where you want * @apiNote This method exists mainly to support debugging, where you want
* to see the elements as they flow past a certain point in a pipeline: * to see the elements as they flow past a certain point in a pipeline:
* <pre>{@code * <pre>{@code
* list.stream() * Stream.of("one", "two", "three", "four")
* .filter(filteringFunction) * .filter(e -> e.length() > 3)
* .peek(e -> System.out.println("Filtered value: " + e)); * .peek(e -> System.out.println("Filtered value: " + e))
* .map(mappingFunction) * .map(String::toUpperCase)
* .peek(e -> System.out.println("Mapped value: " + e)); * .peek(e -> System.out.println("Mapped value: " + e))
* .collect(Collectors.intoList()); * .collect(Collectors.toList());
* }</pre> * }</pre>
* *
* @param action a <a href="package-summary.html#NonInterference"> * @param action a <a href="package-summary.html#NonInterference">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册