OpenJDK / amber / amber
changeset 43990:c71673587a16
8175360: Error in Collectors.averagingXXX Java Doc
Reviewed-by: shade
author | psandoz |
---|---|
date | Thu, 23 Feb 2017 13:09:54 -0800 |
parents | f122846f6beb |
children | b2661845440c |
files | jdk/src/java.base/share/classes/java/util/stream/Collectors.java |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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) {