changeset 8114:fc561b4b80b1

Yet another spec tweak on Spliterator, Spliterators
author briangoetz
date Mon, 15 Apr 2013 11:16:50 -0400
parents 10ad6bc63cbd
children ac8db9ca97c3
files src/share/classes/java/util/Spliterator.java src/share/classes/java/util/Spliterators.java
diffstat 2 files changed, 19 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/Spliterator.java	Mon Apr 15 10:14:40 2013 -0400
+++ b/src/share/classes/java/util/Spliterator.java	Mon Apr 15 11:16:50 2013 -0400
@@ -334,12 +334,12 @@
      * <ul>
      * <li>the value reported for {@code estimateSize()} before splitting,
      * if not already zero or {@code Long.MAX_VALUE}, must, after splitting, be
-     * greater than the {@code estimateSize()} for this and the returned
+     * greater than {@code estimateSize()} for this and the returned
      * Spliterator; and</li>
-     * <li>if this Spliterator before and after splitting and the returned
-     * Spliterator are {@code SIZED} then, the {@code estimateSize()} before
-     * splitting must, after splitting, be equal to the sum of the
-     * {@code estimateSize()} for this and the returned Spliterator.</li>
+     * <li>if this Spliterator is {@code SUBSIZED}, then {@code estimateSize()}
+     * for this spliterator before splitting must be equal to the sum of
+     * {@code estimateSize()} for this and the returned Spliterator after
+     * splitting.</li>
      * </ul>
      *
      * <p>This method may return {@code null} for any reason,
@@ -369,11 +369,12 @@
      * encountered by a {@link #forEachRemaining} traversal, or returns {@link
      * Long#MAX_VALUE} if infinite, unknown, or too expensive to compute.
      *
-     * <p>If this Spliterator is {@link #SIZED}, and has not yet been partially
-     * traversed or split, this estimate must represent an accurate count of
-     * elements that would be encountered by a complete traversal.  Otherwise,
-     * this estimate may be arbitrarily inaccurate, but must decrease as
-     * specified across invocations of {@link #trySplit}.
+     * <p>If this Spliterator is {@link #SIZED} and has not yet been partially
+     * traversed or split, or this Spliterator is {@link #SUBSIZED} and has
+     * not yet been partially traversed, this estimate must be an accurate
+     * count of elements that would be encountered by a complete traversal.
+     * Otherwise, this estimate may be arbitrarily inaccurate, but must decrease
+     * as specified across invocations of {@link #trySplit}.
      *
      * @apiNote
      * Even an inexact estimate is often useful and inexpensive to compute.
--- a/src/share/classes/java/util/Spliterators.java	Mon Apr 15 10:14:40 2013 -0400
+++ b/src/share/classes/java/util/Spliterators.java	Mon Apr 15 11:16:50 2013 -0400
@@ -117,7 +117,7 @@
      * Creates a {@code Spliterator} covering the elements of a given array,
      * using a customized set of spliterator characteristics.
      *
-     * <p>This method is provided as an implementation conveniece for
+     * <p>This method is provided as an implementation convenience for
      * Spliterators which store portions of their elements in arrays, and need
      * fine control over Spliterator characteristics.  Most other situations in
      * which a Spliterator for an array is needed should use
@@ -147,7 +147,7 @@
      * Creates a {@code Spliterator} covering a range of elements of a given
      * array, using a customized set of spliterator characteristics.
      *
-     * <p>This method is provided as an implementation conveniece for
+     * <p>This method is provided as an implementation convenience for
      * Spliterators which store portions of their elements in arrays, and need
      * fine control over Spliterator characteristics.  Most other situations in
      * which a Spliterator for an array is needed should use
@@ -182,7 +182,7 @@
      * Creates a {@code Spliterator.OfInt} covering the elements of a given array,
      * using a customized set of spliterator characteristics.
      *
-     * <p>This method is provided as an implementation conveniece for
+     * <p>This method is provided as an implementation convenience for
      * Spliterators which store portions of their elements in arrays, and need
      * fine control over Spliterator characteristics.  Most other situations in
      * which a Spliterator for an array is needed should use
@@ -210,7 +210,7 @@
      * Creates a {@code Spliterator.OfInt} covering a range of elements of a
      * given array, using a customized set of spliterator characteristics.
      *
-     * <p>This method is provided as an implementation conveniece for
+     * <p>This method is provided as an implementation convenience for
      * Spliterators which store portions of their elements in arrays, and need
      * fine control over Spliterator characteristics.  Most other situations in
      * which a Spliterator for an array is needed should use
@@ -244,7 +244,7 @@
      * Creates a {@code Spliterator.OfLong} covering the elements of a given array,
      * using a customized set of spliterator characteristics.
      *
-     * <p>This method is provided as an implementation conveniece for
+     * <p>This method is provided as an implementation convenience for
      * Spliterators which store portions of their elements in arrays, and need
      * fine control over Spliterator characteristics.  Most other situations in
      * which a Spliterator for an array is needed should use
@@ -272,7 +272,7 @@
      * Creates a {@code Spliterator.OfLong} covering a range of elements of a
      * given array, using a customized set of spliterator characteristics.
      *
-     * <p>This method is provided as an implementation conveniece for
+     * <p>This method is provided as an implementation convenience for
      * Spliterators which store portions of their elements in arrays, and need
      * fine control over Spliterator characteristics.  Most other situations in
      * which a Spliterator for an array is needed should use
@@ -310,7 +310,7 @@
      * Creates a {@code Spliterator.OfDouble} covering the elements of a given array,
      * using a customized set of spliterator characteristics.
      *
-     * <p>This method is provided as an implementation conveniece for
+     * <p>This method is provided as an implementation convenience for
      * Spliterators which store portions of their elements in arrays, and need
      * fine control over Spliterator characteristics.  Most other situations in
      * which a Spliterator for an array is needed should use
@@ -338,7 +338,7 @@
      * Creates a {@code Spliterator.OfDouble} covering a range of elements of a
      * given array, using a customized set of spliterator characteristics.
      *
-     * <p>This method is provided as an implementation conveniece for
+     * <p>This method is provided as an implementation convenience for
      * Spliterators which store portions of their elements in arrays, and need
      * fine control over Spliterator characteristics.  Most other situations in
      * which a Spliterator for an array is needed should use