--- 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) {