From ee9cc8cd7ea8dc48162f5c9bc79be748bd24ab31 Mon Sep 17 00:00:00 2001 From: Paul Sandoz Date: Thu, 23 Feb 2017 13:09:54 -0800 Subject: [PATCH] 8175360: Error in Collectors.averagingXXX Java Doc Reviewed-by: shade --- .../classes/java/util/stream/Collectors.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java index 17c743a9064..02f9ada39c0 100644 --- a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java +++ b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java @@ -720,8 +720,9 @@ public final class Collectors { * the result is 0. * * @param 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 Collector averagingInt(ToIntFunction mapper) { @@ -738,8 +739,9 @@ public final class Collectors { * the result is 0. * * @param 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 Collector averagingLong(ToLongFunction mapper) { @@ -769,8 +771,9 @@ public final class Collectors { * 253, leading to additional numerical errors. * * @param 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 Collector averagingDouble(ToDoubleFunction mapper) {