changeset 7722:e7e7b0a6ee0b

Merge
author briangoetz
date Fri, 22 Mar 2013 16:12:03 -0400
parents 334364b232d9 3c7efb267ab5
children 24e825eb2d37
files
diffstat 1 files changed, 28 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/PrimitiveIterator.java	Fri Mar 22 16:10:01 2013 -0400
+++ b/src/share/classes/java/util/PrimitiveIterator.java	Fri Mar 22 16:12:03 2013 -0400
@@ -31,7 +31,8 @@
 
 /**
  * A base type for primitive specializations of {@code Iterator}.  Subtypes
- * specialize for {@code int}, {@code long}, and {@code double} values.
+ * specialize for {@link OfInt int}, {@link OfLong long}, and
+ * {@link OfDouble double} values.
  *
  * @param <T> the boxed type of a primitive
  * @since 1.8
@@ -69,10 +70,10 @@
          *         action.accept(nextInt());
          * </pre>
          *
-         * <p>This implementation does not have knowledge of the synchronization
-         * protocol used by the implementing Collection.  It is the caller's
-         * responsibility to ensure that usage follows the correct
-         * synchronization protocol for the implementing {@code Iterator.OfInt}.
+         * <p>The default implementation does not apply any synchronization
+         * protocol.  If a {@code PrimitiveIterator.OfInt} implementation has a
+         * specific synchronization protocol, then it must override this default
+         * implementation to apply that protocol.
          *
          * @param action The action to be performed for each element
          * @throws NullPointerException if the specified action is null
@@ -86,8 +87,8 @@
         /**
          * {@inheritDoc}
          * @implSpec
-         * This implementation defers to {@link #nextInt()}, and a warning may
-         * be output that boxing of an {@code int} value will occur.
+         * The default implementation defers to {@link #nextInt()}, and a
+         * warning may be output that boxing of an {@code int} value will occur.
          */
         @Override
         default Integer next() {
@@ -99,13 +100,12 @@
         /**
          * {@inheritDoc}
          * @implSpec
-         * This implementation defers to
+         * The default implementation defers to
          * {@link #forEachInt(java.util.function.IntConsumer)}.  If the
          * action is an instance of {@code IntConsumer} then it defers as
          * if: {@code forEachInt((IntConsumer) action)}.  Otherwise, it
-         * defers as if: {@code forEachInt((IntConsumer) action::accept)},
-         * and a warning may be output that boxing of {@code int} values will
-         * occur.
+         * defers as if: {@code forEachInt(action::accept)}, and a warning may
+         * be output that boxing of {@code int} values will occur.
          */
         @Override
         default void forEach(Consumer<? super Integer> action) {
@@ -152,11 +152,10 @@
          *         action.accept(nextLong());
          * </pre>
          *
-         * <p>This implementation does not have knowledge of the synchronization
-         * protocol used by the implementing Collection.  It is the caller's
-         * responsibility to ensure that usage follows the correct
-         * synchronization protocol for the implementing
-         * {@code Iterator.OfLong}.
+         * <p>The default implementation does not apply any synchronization
+         * protocol.  If a {@code PrimitiveIterator.OfLong} implementation has
+         * a specific synchronization protocol, then it must override this
+         * default implementation to apply that protocol.
          *
          * @param action The action to be performed for each element
          * @throws NullPointerException if the specified action is null
@@ -170,8 +169,8 @@
         /**
          * {@inheritDoc}
          * @implSpec
-         * This implementation defers to {@link #nextLong()}, and a warning may
-         * be output that boxing of an {@code int} value will occur.
+         * The default implementation defers to {@link #nextLong()}, and a
+         * warning may be output that boxing of an {@code int} value will occur.
          */
         @Override
         default Long next() {
@@ -183,13 +182,12 @@
         /**
          * {@inheritDoc}
          * @implSpec
-         * This implementation defers to
+         * The default implementation defers to
          * {@link #forEachLong(java.util.function.LongConsumer)}.  If the
          * action is an instance of {@code LongConsumer} then it defers as
          * if: {@code forEachLong((LongConsumer) action)}.  Otherwise, it
-         * defers as if: {@code forEachLong((LongConsumer) action::accept)},
-         * and a warning may be output that boxing of {@code long} values will
-         * occur.
+         * defers as if: {@code forEachLong(action::accept)}, and a warning may
+         * be output that boxing of {@code long} values will occur.
          */
         @Override
         default void forEach(Consumer<? super Long> action) {
@@ -235,11 +233,10 @@
          *         action.accept(nextDouble());
          * </pre>
          *
-         * <p>This implementation does not have knowledge of the synchronization
-         * protocol used by the implementing Collection.  It is the caller's
-         * responsibility to ensure that usage follows the correct
-         * synchronization protocol for the implementing
-         * {@code Iterator.OfDouble}.
+         * <p>The default implementation does not apply any synchronization
+         * protocol.  If a {@code PrimitiveIterator.OfDouble} implementation has
+         * a specific synchronization protocol, then it must override this
+         * default implementation to apply that protocol.
          *
          * @param action The action to be performed for each element
          * @throws NullPointerException if the specified action is null
@@ -253,8 +250,8 @@
         /**
          * {@inheritDoc}
          * @implSpec
-         * This implementation defers to {@link #nextDouble()}, and a warning
-         * may be output that boxing of an {@code int} value will occur.
+         * The default implementation defers to {@link #nextDouble()}, and a
+         * warning may be output that boxing of an {@code int} value will occur.
          */
         @Override
         default Double next() {
@@ -266,12 +263,11 @@
         /**
          * {@inheritDoc}
          * @implSpec
-         * This implementation defers to
+         * The default implementation defers to
          * {@link #forEachDouble(java.util.function.DoubleConsumer)}.  If the
          * action is an instance of {@code DoubleConsumer} then it defers as
          * if: {@code forEachDouble((DoubleConsumer) action)}.  Otherwise,
-         * it defers as if:
-         * {@code forEachDouble((DoubleConsumer) action::accept)}, and a warning
+         * it defers as if: {@code forEachDouble(action::accept)}, and a warning
          * may be output that boxing of {@code double} values will occur.
          */
         @Override