changeset 7637:247a89d3853f

JavaDoc clean ups.
author psandoz
date Thu, 14 Mar 2013 10:47:08 +0100
parents e42fc5c2911a
children cf2551af0226
files src/share/classes/java/util/Arrays.java
diffstat 1 files changed, 122 insertions(+), 81 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/Arrays.java	Thu Mar 14 10:11:15 2013 +0100
+++ b/src/share/classes/java/util/Arrays.java	Thu Mar 14 10:47:08 2013 +0100
@@ -4418,8 +4418,9 @@
 
 
     /**
-     * Checks that the half-open interval from {@code offset} to {@code offset+length} are within
-     * the range of valid array indexes, and throws an exception if they aren't.
+     * Checks that the half-open interval from {@code offset} to
+     * {@code offset+length} are within the range of valid array indexes, and
+     * throws an exception if they aren't.
      */
     public static void checkOffsetLenBounds(int arrayLength, int offset, int length) throws IndexOutOfBoundsException {
         if (offset < 0 || length < 0 || (offset + length) > arrayLength) {
@@ -4445,7 +4446,7 @@
     }
 
     /**
-     * Produce a {@link Spliterator} for the contents of the specified array.
+     * Creates a {@link Spliterator} for the contents of the specified array.
      *
      * @param array The array for which to create a {@code Spliterator}
      * @param <T> The type of the array elements
@@ -4457,23 +4458,28 @@
     }
 
     /**
-     * Produce a {@link Spliterator} for a contiguous portion of the specified array.
+     * Creates a {@link Spliterator} for a contiguous portion of the specified
+     * array.
      *
      * @param array The array for which to create a {@code Spliterator}
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @param <T> The type of the array elements
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
-     * @return A {@code Spliterator} for the desired portion of the specified array
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
+     * @return A {@code Spliterator} for the desired portion of the specified
+     *         array
      */
     public static <T> Spliterator<T> spliterator(T[] array, int fromIndex, int toIndex) {
         return Spliterators.spliterator(array, fromIndex, toIndex, Spliterator.ORDERED);
     }
 
     /**
-     * Produce a {@link Spliterator.OfInt} for the contents of the specified integer array.
+     * Creates a {@link Spliterator.OfInt} for the contents of the specified
+     * integer array.
      *
      * @param array The array for which to create a {@code Spliterator.OfInt}
      * @throws NullPointerException if the specified array is null
@@ -4484,14 +4490,17 @@
     }
 
     /**
-     * Produce a {@link Spliterator.OfInt} for a contiguous portion of the specified integer array.
+     * Creates a {@link Spliterator.OfInt} for a contiguous portion of the
+     * specified integer array.
      *
      * @param array The array for which to create a {@code Spliterator.OfInt}
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
      * @return A {@code Spliterator.OfInt} for the specified array
      */
     public static Spliterator.OfInt spliterator(int[] array, int fromIndex, int toIndex) {
@@ -4499,7 +4508,7 @@
     }
 
     /**
-     * Produce a {@link Spliterator.OfLong} for the contents of the specified long array.
+     * Creates a {@link Spliterator.OfLong} for the contents of the specified long array.
      *
      * @param array The array for which to create a {@code Spliterator.OfLong}
      * @throws NullPointerException if the specified array is null
@@ -4510,14 +4519,17 @@
     }
 
     /**
-     * Produce a {@link Spliterator.OfLong} for a contiguous portion of the specified long array.
+     * Creates a {@link Spliterator.OfLong} for a contiguous portion of the
+     * specified long array.
      *
      * @param array The array for which to create a {@code Spliterator.OfLong}
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
      * @return A {@code Spliterator.OfLong} for the specified array
      */
     public static Spliterator.OfLong spliterator(long[] array, int fromIndex, int toIndex) {
@@ -4525,7 +4537,8 @@
     }
 
     /**
-     * Produce a {@link Spliterator.OfDouble} for the contents of the specified double array.
+     * Creates a {@link Spliterator.OfDouble} for the contents of the specified
+     * double array.
      *
      * @param array The array for which to create a {@code Spliterator.OfDouble}
      * @throws NullPointerException if the specified array is null
@@ -4536,14 +4549,17 @@
     }
 
     /**
-     * Produce a {@link Spliterator.OfDouble} for a contiguous portion of the specified double array.
+     * Creates a {@link Spliterator.OfDouble} for a contiguous portion of the
+     * specified double array.
      *
      * @param array The array for which to create a {@code Spliterator.OfDouble}
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
      * @return A {@code Spliterator.OfDouble} for the specified array
      */
     public static Spliterator.OfDouble spliterator(double[] array, int fromIndex, int toIndex) {
@@ -4551,7 +4567,7 @@
     }
 
     /**
-     * Produce a sequential {@link Stream} backed by the provided array.
+     * Creates a sequential {@link Stream} backed by the provided array.
      *
      * @param array The array containing the stream contents
      * @param <T> The type of the array elements
@@ -4563,15 +4579,18 @@
     }
 
     /**
-     * Produce a sequential {@link Stream} backed by a contiguous portion of the provided array.
+     * Creates a sequential {@link Stream} backed by a contiguous portion of the
+     * provided array.
      *
      * @param array The array containing the stream contents
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @param <T> The type of the array elements
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
      * @return A {@code Stream} backed by the provided array
      */
     public static <T> Stream<T> stream(T[] array, int fromIndex, int toIndex) {
@@ -4579,7 +4598,7 @@
     }
 
     /**
-     * Produce a sequential {@link IntStream} backed by the provided int array.
+     * Creates a sequential {@link IntStream} backed by the provided int array.
      *
      * @param array The array containing the stream contents
      * @throws NullPointerException if the specified array is null
@@ -4590,40 +4609,46 @@
     }
 
     /**
-     * Produce a sequential {@link IntStream} backed by a contiguous portion of the provided int array.
+     * Creates a sequential {@link IntStream} backed by a contiguous portion of
+     * the provided int array.
      *
      * @param array The array containing the stream contents
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
-     * @return A {@code IntStream} backed by the provided array
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
+     * @return An {@code IntStream} backed by the provided array
      */
     public static IntStream stream(int[] array, int fromIndex, int toIndex) {
         return Streams.intStream(spliterator(array, fromIndex, toIndex));
     }
 
     /**
-     * Produce a sequential {@link LongStream} backed by the provided long array.
+     * Creates a sequential {@link LongStream} backed by the provided long array.
      *
      * @param array The array containing the stream contents
      * @throws NullPointerException if the specified array is null
-     * @return An {@code LongStream} backed by the provided array
+     * @return A {@code LongStream} backed by the provided array
      */
     public static LongStream stream(long[] array) {
         return stream(array, 0, array.length);
     }
 
     /**
-     * Produce a sequential {@link LongStream} backed by a contiguous portion of the provided long array.
+     * Creates a sequential {@link LongStream} backed by a contiguous portion of
+     * the provided long array.
      *
      * @param array The array containing the stream contents
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
      * @return A {@code LongStream} backed by the provided array
      */
     public static LongStream stream(long[] array, int fromIndex, int toIndex) {
@@ -4631,25 +4656,29 @@
     }
 
     /**
-     * Produce a sequential {@link DoubleStream} backed by the provided double array.
+     * Creates a sequential {@link DoubleStream} backed by the provided double
+     * array.
      *
      * @param array The array containing the stream contents
      * @throws NullPointerException if the specified array is null
-     * @return An {@code DoubleStream} backed by the provided array
+     * @return A {@code DoubleStream} backed by the provided array
      */
     public static DoubleStream stream(double[] array) {
         return stream(array, 0, array.length);
     }
 
     /**
-     * Produce a sequential {@link DoubleStream} backed by a contiguous portion of the provided double array.
+     * Creates a sequential {@link DoubleStream} backed by a contiguous portion
+     * of the provided double array.
      *
      * @param array The array containing the stream contents
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
      * @return A {@code DoubleStream} backed by the provided array
      */
     public static DoubleStream stream(double[] array, int fromIndex, int toIndex) {
@@ -4657,7 +4686,7 @@
     }
 
     /**
-     * Produce a parallel {@link Stream} backed by the provided array.
+     * Creates a parallel {@link Stream} backed by the provided array.
      *
      * @param array The array containing the stream contents
      * @param <T> The type of the array elements
@@ -4669,15 +4698,18 @@
     }
 
     /**
-     * Produce a parallel {@link Stream} backed by a contiguous portion of the provided array.
+     * Creates a parallel {@link Stream} backed by a contiguous portion of the
+     * provided array.
      *
      * @param array The array containing the stream contents
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @param <T> The type of the array elements
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
      * @return A {@code Stream} backed by the provided array
      */
     public static <T> Stream<T> parallelStream(T[] array, int fromIndex, int toIndex) {
@@ -4685,7 +4717,7 @@
     }
 
     /**
-     * Produce a parallel {@link IntStream} backed by the provided int array.
+     * Creates a parallel {@link IntStream} backed by the provided int array.
      *
      * @param array The array containing the stream contents
      * @throws NullPointerException if the specified array is null
@@ -4696,40 +4728,46 @@
     }
 
     /**
-     * Produce a parallel {@link IntStream} backed by a contiguous portion of the provided int array.
+     * Creates a parallel {@link IntStream} backed by a contiguous portion of
+     * the provided int array.
      *
      * @param array The array containing the stream contents
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
-     * @return A {@code IntStream} backed by the provided array
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
+     * @return An {@code IntStream} backed by the provided array
      */
     public static IntStream parallelStream(int[] array, int fromIndex, int toIndex) {
         return Streams.intParallelStream(spliterator(array, fromIndex, toIndex));
     }
 
     /**
-     * Produce a parallel {@link LongStream} backed by the provided long array.
+     * Creates a parallel {@link LongStream} backed by the provided long array.
      *
      * @param array The array containing the stream contents
      * @throws NullPointerException if the specified array is null
-     * @return An {@code LongStream} backed by the provided array
+     * @return A {@code LongStream} backed by the provided array
      */
     public static LongStream parallelStream(long[] array) {
         return parallelStream(array, 0, array.length);
     }
 
     /**
-     * Produce a parallel {@link LongStream} backed by a contiguous portion of the provided long array.
+     * Creates a parallel {@link LongStream} backed by a contiguous portion of
+     * the provided long array.
      *
      * @param array The array containing the stream contents
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
      * @return A {@code LongStream} backed by the provided array
      */
     public static LongStream parallelStream(long[] array, int fromIndex, int toIndex) {
@@ -4737,25 +4775,28 @@
     }
 
     /**
-     * Produce a parallel {@link DoubleStream} backed by the provided double array.
+     * Creates a parallel {@link DoubleStream} backed by the provided double array.
      *
      * @param array The array containing the stream contents
      * @throws NullPointerException if the specified array is null
-     * @return An {@code DoubleStream} backed by the provided array
+     * @return A {@code DoubleStream} backed by the provided array
      */
     public static DoubleStream parallelStream(double[] array) {
         return parallelStream(array, 0, array.length);
     }
 
     /**
-     * Produce a parallel {@link DoubleStream} backed by a contiguous portion of the provided double array.
+     * Creates a parallel {@link DoubleStream} backed by a contiguous portion of
+     * the provided double array.
      *
      * @param array The array containing the stream contents
-     * @param fromIndex The index of the first element (inclusive) to be included in the traversal
-     * @param toIndex The index of the last element (exclusive) to be included in the traversal
+     * @param fromIndex The index of the first element (inclusive) to be
+     *        included in the traversal
+     * @param toIndex The index of the last element (exclusive) to be included
+     *        in the traversal
      * @throws NullPointerException if the specified array is null
-     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex is less than fromIndex, or toIndex
-     * is greater than the array size
+     * @throws ArrayIndexOutOfBoundsException if fromIndex is negative, toIndex
+     *         is less than fromIndex, or toIndex is greater than the array size
      * @return A {@code DoubleStream} backed by the provided array
      */
     public static DoubleStream parallelStream(double[] array, int fromIndex, int toIndex) {