changeset 8273:b6cd28ccfda1

Remove Arrays.parallelStream factories
author briangoetz
date Sat, 20 Apr 2013 18:46:42 -0400
parents c44a7124cf25
children 86aff41ca726
files src/share/classes/java/util/Arrays.java
diffstat 1 files changed, 0 insertions(+), 130 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/Arrays.java	Sat Apr 20 17:39:42 2013 -0400
+++ b/src/share/classes/java/util/Arrays.java	Sat Apr 20 18:46:42 2013 -0400
@@ -4951,134 +4951,4 @@
     public static DoubleStream stream(double[] array, int fromIndex, int toIndex) {
         return StreamSupport.doubleStream(spliterator(array, fromIndex, toIndex));
     }
-
-    /**
-     * Returns a parallel {@link Stream} with the specified array as its
-     * source.
-     *
-     * @param <T> The type of the array elements
-     * @param array The array, assumed to be unmodified during use
-     * @return A {@code Stream} from the array
-     * @throws NullPointerException if the specified array is {@code null}
-     * @since 1.8
-     */
-    public static <T> Stream<T> parallelStream(T[] array) {
-        return parallelStream(array, 0, array.length);
-    }
-
-    /**
-     * Returns a parallel {@link Stream} with 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} from the array
-     * @throws NullPointerException if the specified array is {@code null}
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
-     * @since 1.8
-     */
-    public static <T> Stream<T> parallelStream(T[] array, int fromIndex, int toIndex) {
-        return StreamSupport.parallelStream(spliterator(array, fromIndex, toIndex));
-    }
-
-    /**
-     * Returns a parallel {@link IntStream} with the specified array as its
-     * source.
-     *
-     * @param array The array, assumed to be unmodified during use
-     * @return An {@code IntStream} from the array
-     * @throws NullPointerException if the specified array is {@code null}
-     * @since 1.8
-     */
-    public static IntStream parallelStream(int[] array) {
-        return parallelStream(array, 0, array.length);
-    }
-
-    /**
-     * Returns a parallel {@link IntStream} with 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} from the array
-     * @throws NullPointerException if the specified array is {@code null}
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
-     * @since 1.8
-     */
-    public static IntStream parallelStream(int[] array, int fromIndex, int toIndex) {
-        return StreamSupport.intParallelStream(spliterator(array, fromIndex, toIndex));
-    }
-
-    /**
-     * Returns a parallel {@link LongStream} with the specified array as its
-     * source.
-     *
-     * @param array The array, assumed to be unmodified during use
-     * @return A {@code LongStream} from the array
-     * @throws NullPointerException if the specified array is {@code null}
-     * @since 1.8
-     */
-    public static LongStream parallelStream(long[] array) {
-        return parallelStream(array, 0, array.length);
-    }
-
-    /**
-     * Returns a parallel {@link LongStream} with 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} from the array
-     * @throws NullPointerException if the specified array is {@code null}
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
-     * @since 1.8
-     */
-    public static LongStream parallelStream(long[] array, int fromIndex, int toIndex) {
-        return StreamSupport.longParallelStream(spliterator(array, fromIndex, toIndex));
-    }
-
-    /**
-     * Returns a parallel {@link DoubleStream} with the specified array as its
-     * source.
-     *
-     * @param array The array, assumed to be unmodified during use
-     * @return A {@code DoubleStream} from the array
-     * @throws NullPointerException if the specified array is {@code null}
-     * @since 1.8
-     */
-    public static DoubleStream parallelStream(double[] array) {
-        return parallelStream(array, 0, array.length);
-    }
-
-    /**
-     * Returns a parallel {@link DoubleStream} with 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} from the array
-     * @throws NullPointerException if the specified array is {@code null}
-     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
-     *         {@code toIndex} is less than {@code fromIndex}, or
-     *         {@code toIndex} is greater than the array size
-     * @since 1.8
-     */
-    public static DoubleStream parallelStream(double[] array, int fromIndex, int toIndex) {
-        return StreamSupport.doubleParallelStream(spliterator(array, fromIndex, toIndex));
-    }
 }