changeset 8412:2ba70f15710b

javadoc cleanups
author mduigou
date Fri, 26 Apr 2013 12:05:18 -0700
parents 396ead07a8f7
children 60a4b461ee9a
files src/share/classes/java/util/Arrays.java src/share/classes/java/util/stream/DoubleStream.java src/share/classes/java/util/stream/IntStream.java src/share/classes/java/util/stream/LongStream.java src/share/classes/java/util/stream/Stream.java src/share/classes/java/util/stream/StreamBuilder.java src/share/classes/java/util/stream/Streams.java
diffstat 7 files changed, 223 insertions(+), 218 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/Arrays.java	Fri Apr 26 09:39:52 2013 -0700
+++ b/src/share/classes/java/util/Arrays.java	Fri Apr 26 12:05:18 2013 -0700
@@ -4519,14 +4519,14 @@
      * <p>If the generator function throws an exception, it is relayed to
      * the caller and the array is left in an indeterminate state.
      *
-     * @param array Array to be initialized
-     * @param generator Function accepting an index and producing the desired
+     * @param <T> type of elements of the array
+     * @param array array to be initialized
+     * @param generator a function accepting an index and producing the desired
      *        value for that position
-     * @param <T> Type of elements of the array
-     * @throw NullPointerException if the generator is null
+     * @throws NullPointerException if the generator is null
      * @since 1.8
      */
-    public static<T> void setAll(T[] array, IntFunction<? extends T> generator) {
+    public static <T> void setAll(T[] array, IntFunction<? extends T> generator) {
         Objects.requireNonNull(generator);
         for (int i = 0; i < array.length; i++)
             array[i] = generator.apply(i);
@@ -4540,14 +4540,14 @@
      * is thrown from {@code parallelSetAll} and the array is left in an
      * indeterminate state.
      *
-     * @param array Array to be initialized
-     * @param generator Function accepting an index and producing the desired
+     * @param <T> type of elements of the array
+     * @param array array to be initialized
+     * @param generator a function accepting an index and producing the desired
      *        value for that position
-     * @param <T> Type of elements of the array
-     * @throw NullPointerException if the generator is null
+     * @throws NullPointerException if the generator is null
      * @since 1.8
      */
-    public static<T> void parallelSetAll(T[] array, IntFunction<? extends T> generator) {
+    public static <T> void parallelSetAll(T[] array, IntFunction<? extends T> generator) {
         Objects.requireNonNull(generator);
         IntStream.range(0, array.length).parallel().forEach(i -> { array[i] = generator.apply(i); });
     }
@@ -4559,10 +4559,10 @@
      * <p>If the generator function throws an exception, it is relayed to
      * the caller and the array is left in an indeterminate state.
      *
-     * @param array Array to be initialized
-     * @param generator Function accepting an index and producing the desired
+     * @param array array to be initialized
+     * @param generator a function accepting an index and producing the desired
      *        value for that position
-     * @throw NullPointerException if the generator is null
+     * @throws NullPointerException if the generator is null
      * @since 1.8
      */
     public static void setAll(int[] array, IntUnaryOperator generator) {
@@ -4579,10 +4579,10 @@
      * is thrown from {@code parallelSetAll} and the array is left in an
      * indeterminate state.
      *
-     * @param array Array to be initialized
-     * @param generator Function accepting an index and producing the desired
+     * @param array array to be initialized
+     * @param generator a function accepting an index and producing the desired
      * value for that position
-     * @throw NullPointerException if the generator is null
+     * @throws NullPointerException if the generator is null
      * @since 1.8
      */
     public static void parallelSetAll(int[] array, IntUnaryOperator generator) {
@@ -4597,10 +4597,10 @@
      * <p>If the generator function throws an exception, it is relayed to
      * the caller and the array is left in an indeterminate state.
      *
-     * @param array Array to be initialized
-     * @param generator Function accepting an index and producing the desired
+     * @param array array to be initialized
+     * @param generator a function accepting an index and producing the desired
      *        value for that position
-     * @throw NullPointerException if the generator is null
+     * @throws NullPointerException if the generator is null
      * @since 1.8
      */
     public static void setAll(long[] array, IntToLongFunction generator) {
@@ -4617,10 +4617,10 @@
      * is thrown from {@code parallelSetAll} and the array is left in an
      * indeterminate state.
      *
-     * @param array Array to be initialized
-     * @param generator Function accepting an index and producing the desired
+     * @param array array to be initialized
+     * @param generator a function accepting an index and producing the desired
      *        value for that position
-     * @throw NullPointerException if the generator is null
+     * @throws NullPointerException if the generator is null
      * @since 1.8
      */
     public static void parallelSetAll(long[] array, IntToLongFunction generator) {
@@ -4635,10 +4635,10 @@
      * <p>If the generator function throws an exception, it is relayed to
      * the caller and the array is left in an indeterminate state.
      *
-     * @param array Array to be initialized
-     * @param generator Function accepting an index and producing the desired
+     * @param array array to be initialized
+     * @param generator a function accepting an index and producing the desired
      *        value for that position
-     * @throw NullPointerException if the generator is null
+     * @throws NullPointerException if the generator is null
      * @since 1.8
      */
     public static void setAll(double[] array, IntToDoubleFunction generator) {
@@ -4655,10 +4655,10 @@
      * is thrown from {@code parallelSetAll} and the array is left in an
      * indeterminate state.
      *
-     * @param array Array to be initialized
-     * @param generator Function accepting an index and producing the desired
+     * @param array array to be initialized
+     * @param generator a function accepting an index and producing the desired
      *        value for that position
-     * @throw NullPointerException if the generator is null
+     * @throws NullPointerException if the generator is null
      * @since 1.8
      */
     public static void parallelSetAll(double[] array, IntToDoubleFunction generator) {
@@ -4673,9 +4673,9 @@
      * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      * {@link Spliterator#IMMUTABLE}.
      *
-     * @param <T> Type of elements
-     * @param array The array, assumed to be unmodified during use
-     * @return the spliterator for the array elements
+     * @param <T> type of elements
+     * @param array the array, assumed to be unmodified during use
+     * @return a spliterator for the array elements
      * @since 1.8
      */
     public static <T> Spliterator<T> spliterator(T[] array) {
@@ -4691,18 +4691,19 @@
      * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      * {@link Spliterator#IMMUTABLE}.
      *
-     * @param <T> Type of elements
-     * @param array The array, assumed to be unmodified during use
-     * @param fromIndex The least index (inclusive) to cover
-     * @param toIndex One past the greatest index to cover
-     * @return the spliterator for the array elements
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
+     * @param <T> type of elements
+     * @param array the array, assumed to be unmodified during use
+     * @param startInclusive the first index to cover, inclusive
+     * @param endExclusive index immediately past the last index to cover
+     * @return a spliterator for the array elements
+     * @throws ArrayIndexOutOfBoundsException if {@code startInclusive} is
+     *         negative, {@code endExclusive} is less than
+     *         {@code startInclusive}, or {@code endExclusive} is greater than
+     *         the array size
      * @since 1.8
      */
-    public static <T> Spliterator<T> spliterator(T[] array, int fromIndex, int toIndex) {
-        return Spliterators.spliterator(array, fromIndex, toIndex,
+    public static <T> Spliterator<T> spliterator(T[] array, int startInclusive, int endExclusive) {
+        return Spliterators.spliterator(array, startInclusive, endExclusive,
                                         Spliterator.ORDERED | Spliterator.IMMUTABLE);
     }
 
@@ -4713,8 +4714,8 @@
      * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      * {@link Spliterator#IMMUTABLE}.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @return the spliterator for the array elements
+     * @param array the array, assumed to be unmodified during use
+     * @return a spliterator for the array elements
      * @since 1.8
      */
     public static Spliterator.OfInt spliterator(int[] array) {
@@ -4730,17 +4731,18 @@
      * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      * {@link Spliterator#IMMUTABLE}.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @param fromIndex The least index (inclusive) to cover
-     * @param toIndex One past the greatest index to cover
-     * @return the spliterator for the array elements
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
+     * @param array the array, assumed to be unmodified during use
+     * @param startInclusive the first index to cover, inclusive
+     * @param endExclusive index immediately past the last index to cover
+     * @return a spliterator for the array elements
+     * @throws ArrayIndexOutOfBoundsException if {@code startInclusive} is
+     *         negative, {@code endExclusive} is less than
+     *         {@code startInclusive}, or {@code endExclusive} is greater than
+     *         the array size
      * @since 1.8
      */
-    public static Spliterator.OfInt spliterator(int[] array, int fromIndex, int toIndex) {
-        return Spliterators.spliterator(array, fromIndex, toIndex,
+    public static Spliterator.OfInt spliterator(int[] array, int startInclusive, int endExclusive) {
+        return Spliterators.spliterator(array, startInclusive, endExclusive,
                                         Spliterator.ORDERED | Spliterator.IMMUTABLE);
     }
 
@@ -4751,7 +4753,7 @@
      * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      * {@link Spliterator#IMMUTABLE}.
      *
-     * @param array The array, assumed to be unmodified during use
+     * @param array the array, assumed to be unmodified during use
      * @return the spliterator for the array elements
      * @since 1.8
      */
@@ -4768,17 +4770,18 @@
      * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      * {@link Spliterator#IMMUTABLE}.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @param fromIndex The least index (inclusive) to cover
-     * @param toIndex One past the greatest index to cover
-     * @return the spliterator for the array elements
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
+     * @param array the array, assumed to be unmodified during use
+     * @param startInclusive the first index to cover, inclusive
+     * @param endExclusive index immediately past the last index to cover
+     * @return a spliterator for the array elements
+     * @throws ArrayIndexOutOfBoundsException if {@code startInclusive} is
+     *         negative, {@code endExclusive} is less than
+     *         {@code startInclusive}, or {@code endExclusive} is greater than
+     *         the array size
      * @since 1.8
      */
-    public static Spliterator.OfLong spliterator(long[] array, int fromIndex, int toIndex) {
-        return Spliterators.spliterator(array, fromIndex, toIndex,
+    public static Spliterator.OfLong spliterator(long[] array, int startInclusive, int endExclusive) {
+        return Spliterators.spliterator(array, startInclusive, endExclusive,
                                         Spliterator.ORDERED | Spliterator.IMMUTABLE);
     }
 
@@ -4790,8 +4793,8 @@
      * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      * {@link Spliterator#IMMUTABLE}.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @return the spliterator for the array elements
+     * @param array the array, assumed to be unmodified during use
+     * @return a spliterator for the array elements
      * @since 1.8
      */
     public static Spliterator.OfDouble spliterator(double[] array) {
@@ -4807,17 +4810,18 @@
      * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      * {@link Spliterator#IMMUTABLE}.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @param fromIndex The least index (inclusive) to cover
-     * @param toIndex One past the greatest index to cover
-     * @return the spliterator for the array elements
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
+     * @param array the array, assumed to be unmodified during use
+     * @param startInclusive the first index to cover, inclusive
+     * @param endExclusive index immediately past the last index to cover
+     * @return a spliterator for the array elements
+     * @throws ArrayIndexOutOfBoundsException if {@code startInclusive} is
+     *         negative, {@code endExclusive} is less than
+     *         {@code startInclusive}, or {@code endExclusive} is greater than
+     *         the array size
      * @since 1.8
      */
-    public static Spliterator.OfDouble spliterator(double[] array, int fromIndex, int toIndex) {
-        return Spliterators.spliterator(array, fromIndex, toIndex,
+    public static Spliterator.OfDouble spliterator(double[] array, int startInclusive, int endExclusive) {
+        return Spliterators.spliterator(array, startInclusive, endExclusive,
                                         Spliterator.ORDERED | Spliterator.IMMUTABLE);
     }
 
@@ -4827,7 +4831,7 @@
      *
      * @param <T> The type of the array elements
      * @param array The array, assumed to be unmodified during use
-     * @return A {@code Stream} for the array
+     * @return a {@code Stream} for the array
      * @since 1.8
      */
     public static <T> Stream<T> stream(T[] array) {
@@ -4838,27 +4842,27 @@
      * Returns a sequential {@link Stream} with the specified range of the
      * specified array as its source.
      *
-     * @param <T> The type of the array elements
-     * @param array The array, assumed to be unmodified during use
-     * @param fromIndex The index of the first element (inclusive) to be
-     *        encountered
-     * @param toIndex One past the index of the last element to be encountered
-     * @return A {@code Stream} for the array
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
+     * @param <T> the type of the array elements
+     * @param array the array, assumed to be unmodified during use
+     * @param startInclusive the first index to cover, inclusive
+     * @param endExclusive index immediately past the last index to cover
+     * @return a {@code Stream} for the array range
+     * @throws ArrayIndexOutOfBoundsException if {@code startInclusive} is
+     *         negative, {@code endExclusive} is less than
+     *         {@code startInclusive}, or {@code endExclusive} is greater than
+     *         the array size
      * @since 1.8
      */
-    public static <T> Stream<T> stream(T[] array, int fromIndex, int toIndex) {
-        return StreamSupport.stream(spliterator(array, fromIndex, toIndex));
+    public static <T> Stream<T> stream(T[] array, int startInclusive, int endExclusive) {
+        return StreamSupport.stream(spliterator(array, startInclusive, endExclusive));
     }
 
     /**
      * Returns a sequential {@link IntStream} with the specified array as its
      * source.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @return An {@code IntStream} for the array
+     * @param array the array, assumed to be unmodified during use
+     * @return an {@code IntStream} for the array
      * @since 1.8
      */
     public static IntStream stream(int[] array) {
@@ -4869,26 +4873,26 @@
      * Returns a sequential {@link IntStream} with the specified range of the
      * specified array as its source.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @param fromIndex The index of the first element (inclusive) to be
-     *        encountered
-     * @param toIndex One past the index of the last element to be encountered
-     * @return An {@code IntStream} for the array
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
+     * @param array the array, assumed to be unmodified during use
+     * @param startInclusive the first index to cover, inclusive
+     * @param endExclusive index immediately past the last index to cover
+     * @return an {@code IntStream} for the array range
+     * @throws ArrayIndexOutOfBoundsException if {@code startInclusive} is
+     *         negative, {@code endExclusive} is less than
+     *         {@code startInclusive}, or {@code endExclusive} is greater than
+     *         the array size
      * @since 1.8
      */
-    public static IntStream stream(int[] array, int fromIndex, int toIndex) {
-        return StreamSupport.intStream(spliterator(array, fromIndex, toIndex));
+    public static IntStream stream(int[] array, int startInclusive, int endExclusive) {
+        return StreamSupport.intStream(spliterator(array, startInclusive, endExclusive));
     }
 
     /**
      * Returns a sequential {@link LongStream} with the specified array as its
      * source.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @return A {@code LongStream} for the array
+     * @param array the array, assumed to be unmodified during use
+     * @return a {@code LongStream} for the array
      * @since 1.8
      */
     public static LongStream stream(long[] array) {
@@ -4899,26 +4903,26 @@
      * Returns a sequential {@link LongStream} with the specified range of the
      * specified array as its source.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @param fromIndex The index of the first element (inclusive) to be
-     *        encountered
-     * @param toIndex One past the index of the last element to be encountered
-     * @return A {@code LongStream} for the array
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
+     * @param array the array, assumed to be unmodified during use
+     * @param startInclusive the first index to cover, inclusive
+     * @param endExclusive index immediately past the last index to cover
+     * @return a {@code LongStream} for the array range
+     * @throws ArrayIndexOutOfBoundsException if {@code startInclusive} is
+     *         negative, {@code endExclusive} is less than
+     *         {@code startInclusive}, or {@code endExclusive} is greater than
+     *         the array size
      * @since 1.8
      */
-    public static LongStream stream(long[] array, int fromIndex, int toIndex) {
-        return StreamSupport.longStream(spliterator(array, fromIndex, toIndex));
+    public static LongStream stream(long[] array, int startInclusive, int endExclusive) {
+        return StreamSupport.longStream(spliterator(array, startInclusive, endExclusive));
     }
 
     /**
      * Returns a sequential {@link DoubleStream} with the specified array as its
      * source.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @return A {@code DoubleStream} for the array
+     * @param array the array, assumed to be unmodified during use
+     * @return a {@code DoubleStream} for the array
      * @since 1.8
      */
     public static DoubleStream stream(double[] array) {
@@ -4929,17 +4933,17 @@
      * Returns a sequential {@link DoubleStream} with the specified range of the
      * specified array as its source.
      *
-     * @param array The array, assumed to be unmodified during use
-     * @param fromIndex The index of the first element (inclusive) to be
-     *        encountered
-     * @param toIndex One past the index of the last element to be encountered
-     * @return A {@code DoubleStream} for the array
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
+     * @param array the array, assumed to be unmodified during use
+     * @param startInclusive the first index to cover, inclusive
+     * @param endExclusive index immediately past the last index to cover
+     * @return a {@code DoubleStream} for the array range
+     * @throws ArrayIndexOutOfBoundsException if {@code startInclusive} is
+     *         negative, {@code endExclusive} is less than
+     *         {@code startInclusive}, or {@code endExclusive} is greater than
+     *         the array size
      * @since 1.8
      */
-    public static DoubleStream stream(double[] array, int fromIndex, int toIndex) {
-        return StreamSupport.doubleStream(spliterator(array, fromIndex, toIndex));
+    public static DoubleStream stream(double[] array, int startInclusive, int endExclusive) {
+        return StreamSupport.doubleStream(spliterator(array, startInclusive, endExclusive));
     }
 }
--- a/src/share/classes/java/util/stream/DoubleStream.java	Fri Apr 26 09:39:52 2013 -0700
+++ b/src/share/classes/java/util/stream/DoubleStream.java	Fri Apr 26 12:05:18 2013 -0700
@@ -660,7 +660,7 @@
     /**
      * Returns a builder for a {@code DoubleStream}.
      *
-     * @return the stream builder
+     * @return a stream builder
      */
     public static StreamBuilder.OfDouble builder() {
         return new Streams.DoubleStreamBuilderImpl();
@@ -678,8 +678,8 @@
     /**
      * Returns a sequential {@code DoubleStream} containing a single element.
      *
-     * @param t The single element
-     * @return A singleton sequential stream
+     * @param t the single element
+     * @return a singleton sequential stream
      */
     public static DoubleStream of(double t) {
         return StreamSupport.doubleStream(new Streams.DoubleStreamBuilderImpl(t));
@@ -701,15 +701,15 @@
      * producing a {@code Stream} consisting of {@code seed}, {@code f(seed)},
      * {@code f(f(seed))}, etc.
      *
-     * <p>The first element (position {@code 0}) in the {@code DoubleStream} will be
-     * the provided {@code seed}.  For {@code n > 0}, the element at position
-     * {@code n}, will be the result of applying the function {@code f} to the
-     * element at position {@code n - 1}.
+     * <p>The first element (position {@code 0}) in the {@code DoubleStream}
+     * will be the provided {@code seed}.  For {@code n > 0}, the element at
+     * position {@code n}, will be the result of applying the function {@code f}
+     *  to the element at position {@code n - 1}.
      *
-     * @param seed The initial element
-     * @param f The function to be applied to to the previous element to produce
+     * @param seed the initial element
+     * @param f a function to be applied to to the previous element to produce
      *          a new element
-     * @return A new sequential {@code DoubleStream}
+     * @return a new sequential {@code DoubleStream}
      */
     public static DoubleStream iterate(final double seed, final DoubleUnaryOperator f) {
         Objects.requireNonNull(f);
@@ -739,7 +739,7 @@
      * constant streams, streams of random elements, etc.
      *
      * @param s the {@code DoubleSupplier} for generated elements
-     * @return A new sequential {@code DoubleStream}
+     * @return a new sequential {@code DoubleStream}
      */
     public static DoubleStream generate(DoubleSupplier s) {
         Objects.requireNonNull(s);
@@ -766,7 +766,7 @@
      *
      * @param startInclusive the (inclusive) initial value
      * @param endExclusive the exclusive upper bound
-     * @return A sequential {@code DoubleStream} for a range of {@code double}
+     * @return a sequential {@code DoubleStream} for the range of {@code double}
      *         elements
      */
     public static DoubleStream range(double startInclusive, double endExclusive) {
@@ -792,12 +792,11 @@
      * @param startInclusive the (inclusive) initial value
      * @param endExclusive the exclusive upper bound
      * @param step the difference between consecutive values
-     * @return A sequential {@code DoubleStream} for a range of {@code double}
+     * @return a sequential {@code DoubleStream} for tne range of {@code double}
      *         elements
-     * @throws IllegalArgumentException
-     *         if {@code step} is less than or equal to 0,
-     *         or the or the count of elements in the range would be greater
-     *         than {@code Long.MAX_VALUE} or is {@code NaN}.
+     * @throws IllegalArgumentException if {@code step} is less than or equal to
+     *         0. is {@code NaN}, or the count of elements in the range would be
+     *         greater than {@code Long.MAX_VALUE}
      */
     public static DoubleStream range(double startInclusive, double endExclusive, double step) {
         // @@@ Need to check for ranges that may not produce distinct values
--- a/src/share/classes/java/util/stream/IntStream.java	Fri Apr 26 09:39:52 2013 -0700
+++ b/src/share/classes/java/util/stream/IntStream.java	Fri Apr 26 12:05:18 2013 -0700
@@ -662,7 +662,7 @@
     /**
      * Returns a builder for an {@code IntStream}.
      *
-     * @return the stream builder
+     * @return a stream builder
      */
     public static StreamBuilder.OfInt builder() {
         return new Streams.IntStreamBuilderImpl();
@@ -680,8 +680,8 @@
     /**
      * Returns a sequential {@code IntStream} containing a single element.
      *
-     * @param t The single element
-     * @return A singleton sequential stream
+     * @param t the single element
+     * @return a singleton sequential stream
      */
     public static IntStream of(int t) {
         return StreamSupport.intStream(new Streams.IntStreamBuilderImpl(t));
@@ -708,8 +708,8 @@
      * {@code n}, will be the result of applying the function {@code f} to the
      * element at position {@code n - 1}.
      *
-     * @param seed The initial element
-     * @param f The function to be applied to to the previous element to produce
+     * @param seed the initial element
+     * @param f a function to be applied to to the previous element to produce
      *          a new element
      * @return A new sequential {@code IntStream}
      */
@@ -741,7 +741,7 @@
      * constant streams, streams of random elements, etc.
      *
      * @param s the {@code IntSupplier} for generated elements
-     * @return A new sequential {@code IntStream}
+     * @return a new sequential {@code IntStream}
      */
     public static IntStream generate(IntSupplier s) {
         Objects.requireNonNull(s);
@@ -757,8 +757,9 @@
     }
 
     /**
-     * Returns a sequential {@code IntStream} from {@code startInclusive} (inclusive)
-     * to {@code endExclusive} (exclusive) by an incremental step of 1.
+     * Returns a sequential {@code IntStream} from {@code startInclusive}
+     * (inclusive) to {@code endExclusive} (exclusive) by an incremental step of
+     * 1.
      *
      * @implSpec
      * The implementation behaves as if:
@@ -768,7 +769,7 @@
      *
      * @param startInclusive the (inclusive) initial value
      * @param endExclusive the exclusive upper bound
-     * @return A sequential {@code IntStream} for a range of {@code int}
+     * @return a sequential {@code IntStream} for the range of {@code int}
      *         elements
      */
     public static IntStream range(int startInclusive, int endExclusive) {
@@ -790,10 +791,10 @@
      * @param startInclusive the (inclusive) initial value
      * @param endExclusive the exclusive upper bound
      * @param step the positive difference between consecutive values
-     * @return A sequential {@code IntStream} for a range of {@code int}
+     * @return a sequential {@code IntStream} for the range of {@code int}
      *         elements
-     * @throws IllegalArgumentException
-     *         if {@code step} is less than or equal to 0
+     * @throws IllegalArgumentException if {@code step} is less than or equal to
+     *                                  0
      */
     public static IntStream range(int startInclusive, int endExclusive, int step) {
         if (step <= 0) {
--- a/src/share/classes/java/util/stream/LongStream.java	Fri Apr 26 09:39:52 2013 -0700
+++ b/src/share/classes/java/util/stream/LongStream.java	Fri Apr 26 12:05:18 2013 -0700
@@ -653,7 +653,7 @@
     /**
      * Returns a builder for a {@code LongStream}.
      *
-     * @return the stream builder
+     * @return a stream builder
      */
     public static StreamBuilder.OfLong builder() {
         return new Streams.LongStreamBuilderImpl();
@@ -671,8 +671,8 @@
     /**
      * Returns a sequential {@code LongStream} containing a single element.
      *
-     * @param t The single element
-     * @return A singleton sequential stream
+     * @param t the single element
+     * @return a singleton sequential stream
      */
     public static LongStream of(long t) {
         return StreamSupport.longStream(new Streams.LongStreamBuilderImpl(t));
@@ -694,15 +694,15 @@
      * producing a {@code Stream} consisting of {@code seed}, {@code f(seed)},
      * {@code f(f(seed))}, etc.
      *
-     * <p>The first element (position {@code 0}) in the {@code LongStream} will be
-     * the provided {@code seed}.  For {@code n > 0}, the element at position
+     * <p>The first element (position {@code 0}) in the {@code LongStream} will
+     * be the provided {@code seed}.  For {@code n > 0}, the element at position
      * {@code n}, will be the result of applying the function {@code f} to the
      * element at position {@code n - 1}.
      *
-     * @param seed The initial element
-     * @param f The function to be applied to to the previous element to produce
+     * @param seed the initial element
+     * @param f a function to be applied to to the previous element to produce
      *          a new element
-     * @return A new sequential {@code LongStream}
+     * @return a new sequential {@code LongStream}
      */
     public static LongStream iterate(final long seed, final LongUnaryOperator f) {
         Objects.requireNonNull(f);
@@ -727,12 +727,12 @@
     }
 
     /**
-     * Returns a sequential {@code LongStream} where each element is
-     * generated by an {@code LongSupplier}.  This is suitable for generating
-     * constant streams, streams of random elements, etc.
+     * Returns a sequential {@code LongStream} where each element is generated
+     * by a {@code LongSupplier}.  This is suitable for generating constant
+     * streams, streams of random elements, etc.
      *
      * @param s the {@code LongSupplier} for generated elements
-     * @return A new sequential {@code LongStream}
+     * @return a new sequential {@code LongStream}
      */
     public static LongStream generate(LongSupplier s) {
         Objects.requireNonNull(s);
@@ -748,8 +748,9 @@
     }
 
     /**
-     * Returns a sequential {@code LongStream} from {@code startInclusive} (inclusive)
-     * to {@code endExclusive} (exclusive) by an incremental step of 1.
+     * Returns a sequential {@code LongStream} from {@code startInclusive}
+     * (inclusive) to {@code endExclusive} (exclusive) by an incremental step of
+     * 1.
      *
      * @implSpec
      * The implementation behaves as if:
@@ -759,7 +760,7 @@
      *
      * @param startInclusive the (inclusive) initial value
      * @param endExclusive the exclusive upper bound
-     * @return A sequential {@code LongStream} for a range of {@code long}
+     * @return a sequential {@code LongStream} for the range of {@code long}
      *         elements
      */
     public static LongStream range(long startInclusive, final long endExclusive) {
@@ -781,10 +782,10 @@
      * @param startInclusive the (inclusive) initial value
      * @param endExclusive the exclusive upper bound
      * @param step the difference between consecutive values
-     * @return A sequential {@code LongStream} for a range of {@code long}
+     * @return a sequential {@code LongStream} for the range of {@code long}
      *         elements
-     * @throws IllegalArgumentException
-     *         if {@code step} is less than or equal to 0
+     * @throws IllegalArgumentException if {@code step} is less than or equal to
+     *                                  0
      */
     public static LongStream range(long startInclusive, final long endExclusive, final long step) {
         if (step <= 0) {
--- a/src/share/classes/java/util/stream/Stream.java	Fri Apr 26 09:39:52 2013 -0700
+++ b/src/share/classes/java/util/stream/Stream.java	Fri Apr 26 12:05:18 2013 -0700
@@ -792,7 +792,7 @@
      * Returns a builder for a {@code Stream}.
      *
      * @param <T> type of elements
-     * @return the stream builder
+     * @return a stream builder
      */
     public static <T> StreamBuilder<T> builder() {
         return new Streams.StreamBuilderImpl<>();
@@ -801,7 +801,7 @@
     /**
      * Returns an empty sequential {@code Stream}.
      *
-     * @param <T> The type of stream elements
+     * @param <T> the type of stream elements
      * @return an empty sequential stream
      */
     public static <T> Stream<T> empty() {
@@ -811,9 +811,9 @@
     /**
      * Returns a sequential {@code Stream} containing a single element.
      *
-     * @param t The single element
-     * @param <T> The type of stream elements
-     * @return A singleton sequential stream
+     * @param t the single element
+     * @param <T> the type of stream elements
+     * @return a singleton sequential stream
      */
     public static <T> Stream<T> of(T t) {
         return StreamSupport.stream(new Streams.StreamBuilderImpl<>(t));
@@ -822,8 +822,8 @@
     /**
      * Returns a sequential stream whose elements are the specified values.
      *
+     * @param <T> the type of stream elements
      * @param values the elements of the new stream
-     * @param <T> The type of stream elements
      * @return the new stream
      */
     @SafeVarargs
@@ -842,11 +842,11 @@
      * {@code n}, will be the result of applying the function {@code f} to the
      * element at position {@code n - 1}.
      *
-     * @param seed The initial element
-     * @param f The function to be applied to to the previous element to produce
+     * @param <T> the type of stream elements
+     * @param seed the initial element
+     * @param f a function to be applied to to the previous element to produce
      *          a new element
-     * @param <T> The type of stream elements
-     * @return A new sequential {@code Stream}
+     * @return a new sequential {@code Stream}
      */
     public static <T> Stream<T> iterate(final T seed, final UnaryOperator<T> f) {
         Objects.requireNonNull(f);
@@ -874,9 +874,9 @@
      * generated by a {@code Supplier}.  This is suitable for generating
      * constant streams, streams of random elements, etc.
      *
+     * @param <T> the type of stream elements
      * @param s the {@code Supplier} of generated elements
-     * @param <T> The type of stream elements
-     * @return A new sequential {@code Stream}
+     * @return a new sequential {@code Stream}
      */
     public static <T> Stream<T> generate(Supplier<T> s) {
         Objects.requireNonNull(s);
--- a/src/share/classes/java/util/stream/StreamBuilder.java	Fri Apr 26 09:39:52 2013 -0700
+++ b/src/share/classes/java/util/stream/StreamBuilder.java	Fri Apr 26 12:05:18 2013 -0700
@@ -46,7 +46,7 @@
  * for {@link OfInt int}, {@link OfLong long}, and {@link OfDouble double}
  * values.
  *
- * @param <T> The type of stream elements
+ * @param <T> the type of stream elements
  * @see Stream#builder()
  * @since 1.8
  */
@@ -96,11 +96,11 @@
      * A mutable builder for an {@code IntStream}.
      *
      * <p>A stream builder has a lifecycle, where it starts in a building
-     * phase, during which elements can be added, and then transitions to a built
-     * phase, after which elements may not be added.  The built phase begins
-     * when the {@link #build()}} method is called, which creates an ordered
-     * stream whose elements are the elements that were added to the stream
-     * builder, in the order they were added.
+     * phase, during which elements can be added, and then transitions to a
+     * built phase, after which elements may not be added.  The built phase
+     * begins when the {@link #build()}} method is called, which creates an
+     * ordered stream whose elements are the elements that were added to the
+     * stream builder, in the order they were added.
      *
      * @see IntStream#builder()
      * @since 1.8
@@ -128,8 +128,8 @@
          *
          * @param t the element to add
          * @return {@code this} builder
-         * @throws IllegalStateException if the builder has already transitioned to
-         * the built state
+         * @throws IllegalStateException if the builder has already transitioned
+         * to the built state
          */
         default StreamBuilder.OfInt add(int t) {
             accept(t);
@@ -153,11 +153,11 @@
      * A mutable builder for a {@code LongStream}.
      *
      * <p>A stream builder has a lifecycle, where it starts in a building
-     * phase, during which elements can be added, and then transitions to a built
-     * phase, after which elements may not be added.  The built phase begins
-     * when the {@link #build()}} method is called, which creates an ordered
-     * stream whose elements are the elements that were added to the stream
-     * builder, in the order they were added.
+     * phase, during which elements can be added, and then transitions to a
+     * built phase, after which elements may not be added.  The built phase
+     * begins when the {@link #build()}} method is called, which creates an
+     * ordered stream whose elements are the elements that were added to the
+     * stream builder, in the order they were added.
      *
      * @see LongStream#builder()
      * @since 1.8
@@ -167,8 +167,8 @@
         /**
          * Adds an element to the stream being built.
          *
-         * @throws IllegalStateException if the builder has already transitioned to
-         * the built state
+         * @throws IllegalStateException if the builder has already transitioned
+         * to the built state
          */
         @Override
         void accept(long t);
@@ -218,11 +218,11 @@
          * Adds an element to the stream being built.
          *
          * <p>A stream builder  has a lifecycle, where it starts in a building
-         * phase, during which elements can be added, and then transitions to a built
-         * phase, after which elements may not be added.  The built phase begins
-         * when the {@link #build()}} method is called, which creates an ordered
-         * stream whose elements are the elements that were added to the stream
-         * builder, in the order they were added.
+         * phase, during which elements can be added, and then transitions to a
+         * built phase, after which elements may not be added.  The built phase
+         * begins when the {@link #build()}} method is called, which creates an
+         * ordered stream whose elements are the elements that were added to the
+         * stream builder, in the order they were added.
          *
          * @throws IllegalStateException if the builder has already transitioned
          * to the built state
--- a/src/share/classes/java/util/stream/Streams.java	Fri Apr 26 09:39:52 2013 -0700
+++ b/src/share/classes/java/util/stream/Streams.java	Fri Apr 26 12:05:18 2013 -0700
@@ -38,9 +38,9 @@
 /**
  * Utility methods for operating on and creating streams.
  *
- * <p> Unless otherwise stated, streams are created as sequential
- * streams.  A sequential stream can be transformed into a parallel stream by
- * calling the {@code parallel()} method on the created stream.
+ * <p>Unless otherwise stated, streams are created as sequential streams.  A
+ * sequential stream can be transformed into a parallel stream by calling the
+ * {@code parallel()} method on the created stream.
  *
  * @since 1.8
  */
@@ -67,11 +67,11 @@
      * of the input streams are ordered, and parallel if either of the input
      * streams is parallel.
      *
-     * @param a The first {@code Stream}
-     * @param b The second {@code Stream} to concatenate on to end of the first
+     * @param <T> The type of stream elements
+     * @param a the first {@code Stream}
+     * @param b the second {@code Stream} to concatenate on to end of the first
      *        stream
-     * @param <T> The type of stream elements
-     * @return The concatenation of the two input streams
+     * @return the concatenation of the two input streams
      */
     public static <T> Stream<T> concat(Stream<? extends T> a, Stream<? extends T> b) {
         @SuppressWarnings("unchecked")
@@ -164,15 +164,15 @@
      * streams; any elements remaining in the larger of the two streams will not
      * be consumed.
      *
-     * @param a The first {@code Stream} to combine
-     * @param b The second {@code Stream} to combine
-     * @param zipper The function applied to an element from the first
+     * @param <A> the type of elements of the first {@code Stream}
+     * @param <B> the type of elements of the second {@code Stream}
+     * @param <C> the type of elements of the zipped {@code Stream}
+     * @param a the first {@code Stream} to combine
+     * @param b the second {@code Stream} to combine
+     * @param zipper a function applied to an element from the first
      *        {@code Stream} and an element from the second {@code Stream} to
      *        produce an element for the combined {@code Stream}
-     * @param <A> The type of elements of the first {@code Stream}
-     * @param <B> The type of elements of the second {@code Stream}
-     * @param <C> The type of elements of the zipped {@code Stream}
-     * @return A combined {@code Stream}
+     * @return a combined {@code Stream}
      */
     public static <A, B, C> Stream<C> zip(Stream<? extends A> a,
                                          Stream<? extends B> b,
@@ -349,12 +349,12 @@
 
     /**
      * A {@code double} range spliterator.
-     * <p>
-     * The traversing and splitting logic is equivalent to that of
+     *
+     * <p>The traversing and splitting logic is equivalent to that of
      * {@code RangeLongSpliterator} for increasing values with a {@code step} of
      * {@code 1}.
-     * <p>
-     * A {@code double} value is calculated from the function
+     *
+     *  <p>A {@code double} value is calculated from the function
      * {@code start + i * step} where {@code i} is the absolute position of the
      * value when traversing an instance of this class that has not been split.
      * This ensures the same values are produced at the same absolute positions