8175360: Error in Collectors.averagingXXX Java Doc
authorpsandoz
Thu, 23 Feb 2017 13:09:54 -0800
changeset 43990 c71673587a16
parent 43989 f122846f6beb
child 43991 b2661845440c
8175360: Error in Collectors.averagingXXX Java Doc Reviewed-by: shade
jdk/src/java.base/share/classes/java/util/stream/Collectors.java
--- a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java	Thu Feb 23 17:48:24 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java	Thu Feb 23 13:09:54 2017 -0800
@@ -720,8 +720,9 @@
      * the result is 0.
      *
      * @param <T> the type of the input elements
-     * @param mapper a function extracting the property to be summed
-     * @return a {@code Collector} that produces the sum of a derived property
+     * @param mapper a function extracting the property to be averaged
+     * @return a {@code Collector} that produces the arithmetic mean of a
+     * derived property
      */
     public static <T> Collector<T, ?, Double>
     averagingInt(ToIntFunction<? super T> mapper) {
@@ -738,8 +739,9 @@
      * the result is 0.
      *
      * @param <T> the type of the input elements
-     * @param mapper a function extracting the property to be summed
-     * @return a {@code Collector} that produces the sum of a derived property
+     * @param mapper a function extracting the property to be averaged
+     * @return a {@code Collector} that produces the arithmetic mean of a
+     * derived property
      */
     public static <T> Collector<T, ?, Double>
     averagingLong(ToLongFunction<? super T> mapper) {
@@ -769,8 +771,9 @@
      * 2<sup>53</sup>, leading to additional numerical errors.
      *
      * @param <T> the type of the input elements
-     * @param mapper a function extracting the property to be summed
-     * @return a {@code Collector} that produces the sum of a derived property
+     * @param mapper a function extracting the property to be averaged
+     * @return a {@code Collector} that produces the arithmetic mean of a
+     * derived property
      */
     public static <T> Collector<T, ?, Double>
     averagingDouble(ToDoubleFunction<? super T> mapper) {