changeset 8121:bd2d2052aa39

documentation nits. Reviewed-by: briangoetz
author mduigou
date Mon, 15 Apr 2013 16:28:02 -0700
parents 8e0a2b074268
children d5a5b70d06d2
files src/share/classes/java/util/DoubleSummaryStatistics.java src/share/classes/java/util/IntSummaryStatistics.java src/share/classes/java/util/LongSummaryStatistics.java
diffstat 3 files changed, 22 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/DoubleSummaryStatistics.java	Mon Apr 15 19:21:43 2013 -0400
+++ b/src/share/classes/java/util/DoubleSummaryStatistics.java	Mon Apr 15 16:28:02 2013 -0700
@@ -39,13 +39,7 @@
  *     DoubleSummaryStatistics::combine);
  * }</pre>
  *
- * While this class is not thread-safe, the
- * {@link java.util.stream.DoubleStream#collect(java.util.function.Supplier,
- * java.util.function.ObjDoubleConsumer,
- * java.util.function.BiConsumer) collect} is parallel-safe; the above example
- * is accurate and safe on both sequential and parallel streams.
- *
- * DoubleSummaryStatistics can be used as a
+ * <p>{@code DoubleSummaryStatistics} can be used as a
  * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
  * target for a {@linkplain java.util.stream.Stream stream}. For example:
  *
@@ -58,9 +52,11 @@
  * maximum, sum, and average of their weights.
  *
  * @implNote This implementation is not thread safe. However, it is safe to use
- * Collectors.toDoubleStatistics on a parallel stream, because the parallel
- * implementation of Stream#collect provides the necessary partitioning,
- * isolation, and merging of results for safe and efficient parallel execution.
+ * {@link java.util.stream.Collectors#toDoubleSummaryStatistics(java.util.function.ToDoubleFunction)
+ * Collectors.toDoubleStatistics()} on a parallel stream, because the parallel
+ * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
+ * provides the necessary partitioning, isolation, and merging of results for
+ * safe and efficient parallel execution.
  * @since 1.8
  */
 public class DoubleSummaryStatistics implements DoubleConsumer {
@@ -181,6 +177,6 @@
             getSum(),
             getMin(),
             getAverage(),
-            getMax()).toString();
+            getMax());
     }
 }
--- a/src/share/classes/java/util/IntSummaryStatistics.java	Mon Apr 15 19:21:43 2013 -0400
+++ b/src/share/classes/java/util/IntSummaryStatistics.java	Mon Apr 15 16:28:02 2013 -0700
@@ -39,13 +39,7 @@
  *     IntSummaryStatistics::combine);
  * }</pre>
  *
- * While this class is not thread-safe, the
- * {@link java.util.stream.IntStream#collect(java.util.function.Supplier,
- * java.util.function.ObjIntConsumer,
- * java.util.function.BiConsumer) collect} is parallel-safe; the above example
- * is accurate and safe on both sequential and parallel streams.
- *
- * IntSummaryStatistics can be used as a
+ * <p>{@code IntSummaryStatistics} can be used as a
  * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
  * target for a {@linkplain java.util.stream.Stream stream}. For example:
  *
@@ -58,10 +52,12 @@
  * maximum, sum, and average of their number of dependents.
  *
  * @implNote This implementation is not thread safe. However, it is safe to use
- * Collectors.toIntStatistics on a parallel stream, because the parallel
- * implementation of Stream#collect provides the necessary partitioning,
- * isolation, and merging of results for safe and efficient parallel execution.
- * 
+ * {@link java.util.stream.Collectors#toIntSummaryStatistics(java.util.function.ToIntFunction)
+ * Collectors.toIntStatistics()} on a parallel stream, because the parallel
+ * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
+ * provides the necessary partitioning, isolation, and merging of results for
+ * safe and efficient parallel execution.
+ *
  * <p>This implementation does not check for overflow of the sum.
  * @since 1.8
  */
@@ -162,6 +158,6 @@
             getSum(),
             getMin(),
             getAverage(),
-            getMax()).toString();
+            getMax());
     }
 }
--- a/src/share/classes/java/util/LongSummaryStatistics.java	Mon Apr 15 19:21:43 2013 -0400
+++ b/src/share/classes/java/util/LongSummaryStatistics.java	Mon Apr 15 16:28:02 2013 -0700
@@ -40,13 +40,7 @@
  *     LongSummaryStatistics::combine);
  * }</pre>
  *
- * While this class is not thread-safe, the
- * {@link java.util.stream.LongStream#collect(java.util.function.Supplier,
- * java.util.function.ObjLongConsumer,
- * java.util.function.BiConsumer) collect} is parallel-safe; the above example
- * is accurate and safe on both sequential and parallel streams.
- *
- * LongSummaryStatistics can be used as a
+ * <p>{@code LongSummaryStatistics} can be used as a
  * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
  * target for a {@linkplain java.util.stream.Stream stream}. For example:
  *
@@ -59,9 +53,11 @@
  * maximum, sum, and average of their ages in milliseconds.
  *
  * @implNote This implementation is not thread safe. However, it is safe to use
- * Collectors.toLongStatistics on a parallel stream, because the parallel
- * implementation of Stream#collect provides the necessary partitioning,
- * isolation, and merging of results for safe and efficient parallel execution.
+ * {@link java.util.stream.Collectors#toLongSummaryStatistics(java.util.function.ToLongFunction)
+ * Collectors.toLongStatistics()} on a parallel stream, because the parallel
+ * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
+ * provides the necessary partitioning, isolation, and merging of results for
+ * safe and efficient parallel execution.
  *
  * <p>This implementation does not check for overflow of the sum.
  * @since 1.8
@@ -174,6 +170,6 @@
             getSum(),
             getMin(),
             getAverage(),
-            getMax()).toString();
+            getMax());
     }
 }