Lines Matching defs:to

8  * particular file as subject to the "Classpath" exception as provided
18 * 2 along with this work; if not, write to the Free Software Foundation,
33 * that allows arrays to be viewed as lists.
41 * <i>specification</i>. Implementors should feel free to substitute other
42 * algorithms, so long as the specification itself is adhered to. (For
43 * example, the algorithm used by {@code sort(Object[])} does not have to be
44 * a MergeSort, but it does have to be <i>stable</i>.)
70 * quicksorts to degrade to quadratic performance, and is typically
73 * @param a the array to be sorted
81 * to be sorted extends from the index {@code fromIndex}, inclusive, to
83 * the range to be sorted is empty.
88 * quicksorts to degrade to quadratic performance, and is typically
91 * @param a the array to be sorted
92 * @param fromIndex the index of the first element, inclusive, to be sorted
93 * @param toIndex the index of the last element, exclusive, to be sorted
110 * quicksorts to degrade to quadratic performance, and is typically
113 * @param a the array to be sorted
121 * to be sorted extends from the index {@code fromIndex}, inclusive, to
123 * the range to be sorted is empty.
128 * quicksorts to degrade to quadratic performance, and is typically
131 * @param a the array to be sorted
132 * @param fromIndex the index of the first element, inclusive, to be sorted
133 * @param toIndex the index of the last element, exclusive, to be sorted
150 * quicksorts to degrade to quadratic performance, and is typically
153 * @param a the array to be sorted
161 * to be sorted extends from the index {@code fromIndex}, inclusive, to
163 * the range to be sorted is empty.
168 * quicksorts to degrade to quadratic performance, and is typically
171 * @param a the array to be sorted
172 * @param fromIndex the index of the first element, inclusive, to be sorted
173 * @param toIndex the index of the last element, exclusive, to be sorted
190 * quicksorts to degrade to quadratic performance, and is typically
193 * @param a the array to be sorted
201 * to be sorted extends from the index {@code fromIndex}, inclusive, to
203 * the range to be sorted is empty.
208 * quicksorts to degrade to quadratic performance, and is typically
211 * @param a the array to be sorted
212 * @param fromIndex the index of the first element, inclusive, to be sorted
213 * @param toIndex the index of the last element, exclusive, to be sorted
230 * quicksorts to degrade to quadratic performance, and is typically
233 * @param a the array to be sorted
241 * to be sorted extends from the index {@code fromIndex}, inclusive, to
243 * the range to be sorted is empty.
248 * quicksorts to degrade to quadratic performance, and is typically
251 * @param a the array to be sorted
252 * @param fromIndex the index of the first element, inclusive, to be sorted
253 * @param toIndex the index of the last element, exclusive, to be sorted
269 * value compares neither less than, greater than, nor equal to any value,
278 * quicksorts to degrade to quadratic performance, and is typically
281 * @param a the array to be sorted
289 * to be sorted extends from the index {@code fromIndex}, inclusive, to
291 * the range to be sorted is empty.
295 * value compares neither less than, greater than, nor equal to any value,
304 * quicksorts to degrade to quadratic performance, and is typically
307 * @param a the array to be sorted
308 * @param fromIndex the index of the first element, inclusive, to be sorted
309 * @param toIndex the index of the last element, exclusive, to be sorted
325 * value compares neither less than, greater than, nor equal to any value,
334 * quicksorts to degrade to quadratic performance, and is typically
337 * @param a the array to be sorted
345 * to be sorted extends from the index {@code fromIndex}, inclusive, to
347 * the range to be sorted is empty.
351 * value compares neither less than, greater than, nor equal to any value,
360 * quicksorts to degrade to quadratic performance, and is typically
363 * @param a the array to be sorted
364 * @param fromIndex the index of the first element, inclusive, to be sorted
365 * @param toIndex the index of the last element, exclusive, to be sorted
383 * Cannot be a static boolean in the enclosing class due to
398 * If not, you are better off deleting ComparableTimSort to
428 * to the {@linkplain Comparable natural ordering} of its elements.
435 * <p>This sort is guaranteed to be <i>stable</i>: equal elements will
445 * input arrays to n/2 object references for randomly ordered input
451 * input array. It is well-suited to merging two or more sorted arrays:
461 * @param a the array to be sorted
465 * ordering of the array elements is found to violate the
483 * ascending order, according to the
485 * elements. The range to be sorted extends from index
486 * {@code fromIndex}, inclusive, to index {@code toIndex}, exclusive.
487 * (If {@code fromIndex==toIndex}, the range to be sorted is empty.) All
494 * <p>This sort is guaranteed to be <i>stable</i>: equal elements will
504 * input arrays to n/2 object references for randomly ordered input
510 * input array. It is well-suited to merging two or more sorted arrays:
520 * @param a the array to be sorted
521 * @param fromIndex the index of the first element (inclusive) to be
523 * @param toIndex the index of the last element (exclusive) to be sorted
526 * found to violate the {@link Comparable} contract
550 * used in preference to mergesort.
558 * low is the index in dest to start sorting
559 * high is the end index in dest to end sorting
560 * off is the offset to generate corresponding low, high in src
588 // If list is already sorted, just copy from src to dest. This is an
614 * Sorts the specified array of objects according to the order induced by
620 * <p>This sort is guaranteed to be <i>stable</i>: equal elements will
630 * input arrays to n/2 object references for randomly ordered input
636 * input array. It is well-suited to merging two or more sorted arrays:
646 * @param a the array to be sorted
647 * @param c the comparator to determine the order of the array. A
653 * found to violate the {@link Comparator} contract
673 * to the order induced by the specified comparator. The range to be
674 * sorted extends from index {@code fromIndex}, inclusive, to index
676 * range to be sorted is empty.) All elements in the range must be
681 * <p>This sort is guaranteed to be <i>stable</i>: equal elements will
691 * input arrays to n/2 object references for randomly ordered input
697 * input array. It is well-suited to merging two or more sorted arrays:
707 * @param a the array to be sorted
708 * @param fromIndex the index of the first element (inclusive) to be
710 * @param toIndex the index of the last element (exclusive) to be sorted
711 * @param c the comparator to determine the order of the array. A
717 * (optional) if the comparator is found to violate the
744 * low is the index in dest to start sorting
745 * high is the end index in dest to end sorting
746 * off is the offset into src corresponding to low in dest
772 // If list is already sorted, just copy from src to dest. This is an
810 * by the {@link #sort(long[])} method) prior to making this call. If it
815 * @param a the array to be searched
816 * @param key the value to be searched for
836 * prior to making this call. If it
841 * @param a the array to be searched
842 * @param fromIndex the index of the first element (inclusive) to be
844 * @param toIndex the index of the last element (exclusive) to be searched
845 * @param key the value to be searched for
891 * by the {@link #sort(int[])} method) prior to making this call. If it
896 * @param a the array to be searched
897 * @param key the value to be searched for
917 * prior to making this call. If it
922 * @param a the array to be searched
923 * @param fromIndex the index of the first element (inclusive) to be
925 * @param toIndex the index of the last element (exclusive) to be searched
926 * @param key the value to be searched for
972 * (as by the {@link #sort(short[])} method) prior to making this call. If
977 * @param a the array to be searched
978 * @param key the value to be searched for
998 * prior to making this call. If
1003 * @param a the array to be searched
1004 * @param fromIndex the index of the first element (inclusive) to be
1006 * @param toIndex the index of the last element (exclusive) to be searched
1007 * @param key the value to be searched for
1053 * by the {@link #sort(char[])} method) prior to making this call. If it
1058 * @param a the array to be searched
1059 * @param key the value to be searched for
1079 * prior to making this call. If it
1084 * @param a the array to be searched
1085 * @param fromIndex the index of the first element (inclusive) to be
1087 * @param toIndex the index of the last element (exclusive) to be searched
1088 * @param key the value to be searched for
1134 * by the {@link #sort(byte[])} method) prior to making this call. If it
1139 * @param a the array to be searched
1140 * @param key the value to be searched for
1160 * prior to making this call. If it
1165 * @param a the array to be searched
1166 * @param fromIndex the index of the first element (inclusive) to be
1168 * @param toIndex the index of the last element (exclusive) to be searched
1169 * @param key the value to be searched for
1215 * (as by the {@link #sort(double[])} method) prior to making this call.
1218 * one will be found. This method considers all NaN values to be
1221 * @param a the array to be searched
1222 * @param key the value to be searched for
1242 * prior to making this call.
1245 * one will be found. This method considers all NaN values to be
1248 * @param a the array to be searched
1249 * @param fromIndex the index of the first element (inclusive) to be
1251 * @param toIndex the index of the last element (exclusive) to be searched
1252 * @param key the value to be searched for
1306 * (as by the {@link #sort(float[])} method) prior to making this call. If
1309 * one will be found. This method considers all NaN values to be
1312 * @param a the array to be searched
1313 * @param key the value to be searched for
1333 * prior to making this call. If
1336 * one will be found. This method considers all NaN values to be
1339 * @param a the array to be searched
1340 * @param fromIndex the index of the first element (inclusive) to be
1342 * @param toIndex the index of the last element (exclusive) to be searched
1343 * @param key the value to be searched for
1397 * according to the
1400 * {@link #sort(Object[])} method) prior to making this call.
1404 * to the natural ordering of its elements, hence results are undefined.)
1406 * elements equal to the specified object, there is no guarantee which
1409 * @param a the array to be searched
1410 * @param key the value to be searched for
1419 * @throws ClassCastException if the search key is not comparable to the
1431 * according to the
1434 * {@link #sort(Object[], int, int)} method) prior to making this
1438 * to the natural ordering of its elements, hence results are undefined.)
1440 * elements equal to the specified object, there is no guarantee which
1443 * @param a the array to be searched
1444 * @param fromIndex the index of the first element (inclusive) to be
1446 * @param toIndex the index of the last element (exclusive) to be searched
1447 * @param key the value to be searched for
1458 * @throws ClassCastException if the search key is not comparable to the
1496 * according to the specified comparator (as by the
1498 * method) prior to making this call. If it is
1501 * elements equal to the specified object, there is no guarantee which one
1504 * @param a the array to be searched
1505 * @param key the value to be searched for
1519 * or the search key is not comparable to the
1531 * according to the specified comparator (as by the
1534 * method) prior to making this call.
1536 * If the range contains multiple elements equal to the specified object,
1539 * @param a the array to be searched
1540 * @param fromIndex the index of the first element (inclusive) to be
1542 * @param toIndex the index of the last element (exclusive) to be searched
1543 * @param key the value to be searched for
1559 * or the search key is not comparable to the
1600 * <i>equal</i> to one another. Two arrays are considered equal if both
1606 * @param a one array to be tested for equality
1607 * @param a2 the other array to be tested for equality
1629 * <i>equal</i> to one another. Two arrays are considered equal if both
1635 * @param a one array to be tested for equality
1636 * @param a2 the other array to be tested for equality
1658 * <i>equal</i> to one another. Two arrays are considered equal if both
1664 * @param a one array to be tested for equality
1665 * @param a2 the other array to be tested for equality
1687 * <i>equal</i> to one another. Two arrays are considered equal if both
1693 * @param a one array to be tested for equality
1694 * @param a2 the other array to be tested for equality
1716 * <i>equal</i> to one another. Two arrays are considered equal if both
1722 * @param a one array to be tested for equality
1723 * @param a2 the other array to be tested for equality
1745 * <i>equal</i> to one another. Two arrays are considered equal if both
1751 * @param a one array to be tested for equality
1752 * @param a2 the other array to be tested for equality
1774 * <i>equal</i> to one another. Two arrays are considered equal if both
1783 * <tt>NaN</tt> equals to itself, and 0.0d unequal to -0.0d.)
1785 * @param a one array to be tested for equality
1786 * @param a2 the other array to be tested for equality
1809 * <i>equal</i> to one another. Two arrays are considered equal if both
1818 * <tt>NaN</tt> equals to itself, and 0.0f unequal to -0.0f.)
1820 * @param a one array to be tested for equality
1821 * @param a2 the other array to be tested for equality
1844 * <i>equal</i> to one another. The two arrays are considered equal if
1852 * @param a one array to be tested for equality
1853 * @param a2 the other array to be tested for equality
1879 * Assigns the specified long value to each element of the specified array
1882 * @param a the array to be filled
1883 * @param val the value to be stored in all elements of the array
1891 * Assigns the specified long value to each element of the specified
1892 * range of the specified array of longs. The range to be filled
1893 * extends from index <tt>fromIndex</tt>, inclusive, to index
1895 * range to be filled is empty.)
1897 * @param a the array to be filled
1898 * @param fromIndex the index of the first element (inclusive) to be
1900 * @param toIndex the index of the last element (exclusive) to be
1902 * @param val the value to be stored in all elements of the array
1914 * Assigns the specified int value to each element of the specified array
1917 * @param a the array to be filled
1918 * @param val the value to be stored in all elements of the array
1926 * Assigns the specified int value to each element of the specified
1927 * range of the specified array of ints. The range to be filled
1928 * extends from index <tt>fromIndex</tt>, inclusive, to index
1930 * range to be filled is empty.)
1932 * @param a the array to be filled
1933 * @param fromIndex the index of the first element (inclusive) to be
1935 * @param toIndex the index of the last element (exclusive) to be
1937 * @param val the value to be stored in all elements of the array
1949 * Assigns the specified short value to each element of the specified array
1952 * @param a the array to be filled
1953 * @param val the value to be stored in all elements of the array
1961 * Assigns the specified short value to each element of the specified
1962 * range of the specified array of shorts. The range to be filled
1963 * extends from index <tt>fromIndex</tt>, inclusive, to index
1965 * range to be filled is empty.)
1967 * @param a the array to be filled
1968 * @param fromIndex the index of the first element (inclusive) to be
1970 * @param toIndex the index of the last element (exclusive) to be
1972 * @param val the value to be stored in all elements of the array
1984 * Assigns the specified char value to each element of the specified array
1987 * @param a the array to be filled
1988 * @param val the value to be stored in all elements of the array
1996 * Assigns the specified char value to each element of the specified
1997 * range of the specified array of chars. The range to be filled
1998 * extends from index <tt>fromIndex</tt>, inclusive, to index
2000 * range to be filled is empty.)
2002 * @param a the array to be filled
2003 * @param fromIndex the index of the first element (inclusive) to be
2005 * @param toIndex the index of the last element (exclusive) to be
2007 * @param val the value to be stored in all elements of the array
2019 * Assigns the specified byte value to each element of the specified array
2022 * @param a the array to be filled
2023 * @param val the value to be stored in all elements of the array
2031 * Assigns the specified byte value to each element of the specified
2032 * range of the specified array of bytes. The range to be filled
2033 * extends from index <tt>fromIndex</tt>, inclusive, to index
2035 * range to be filled is empty.)
2037 * @param a the array to be filled
2038 * @param fromIndex the index of the first element (inclusive) to be
2040 * @param toIndex the index of the last element (exclusive) to be
2042 * @param val the value to be stored in all elements of the array
2054 * Assigns the specified boolean value to each element of the specified
2057 * @param a the array to be filled
2058 * @param val the value to be stored in all elements of the array
2066 * Assigns the specified boolean value to each element of the specified
2067 * range of the specified array of booleans. The range to be filled
2068 * extends from index <tt>fromIndex</tt>, inclusive, to index
2070 * range to be filled is empty.)
2072 * @param a the array to be filled
2073 * @param fromIndex the index of the first element (inclusive) to be
2075 * @param toIndex the index of the last element (exclusive) to be
2077 * @param val the value to be stored in all elements of the array
2090 * Assigns the specified double value to each element of the specified
2093 * @param a the array to be filled
2094 * @param val the value to be stored in all elements of the array
2102 * Assigns the specified double value to each element of the specified
2103 * range of the specified array of doubles. The range to be filled
2104 * extends from index <tt>fromIndex</tt>, inclusive, to index
2106 * range to be filled is empty.)
2108 * @param a the array to be filled
2109 * @param fromIndex the index of the first element (inclusive) to be
2111 * @param toIndex the index of the last element (exclusive) to be
2113 * @param val the value to be stored in all elements of the array
2125 * Assigns the specified float value to each element of the specified array
2128 * @param a the array to be filled
2129 * @param val the value to be stored in all elements of the array
2137 * Assigns the specified float value to each element of the specified
2138 * range of the specified array of floats. The range to be filled
2139 * extends from index <tt>fromIndex</tt>, inclusive, to index
2141 * range to be filled is empty.)
2143 * @param a the array to be filled
2144 * @param fromIndex the index of the first element (inclusive) to be
2146 * @param toIndex the index of the last element (exclusive) to be
2148 * @param val the value to be stored in all elements of the array
2160 * Assigns the specified Object reference to each element of the specified
2163 * @param a the array to be filled
2164 * @param val the value to be stored in all elements of the array
2174 * Assigns the specified Object reference to each element of the specified
2175 * range of the specified array of Objects. The range to be filled
2176 * extends from index <tt>fromIndex</tt>, inclusive, to index
2178 * range to be filled is empty.)
2180 * @param a the array to be filled
2181 * @param fromIndex the index of the first element (inclusive) to be
2183 * @param toIndex the index of the last element (exclusive) to be
2185 * @param val the value to be stored in all elements of the array
2210 * @param original the array to be copied
2211 * @param newLength the length of the copy to be returned
2213 * to obtain the specified length
2232 * @param original the array to be copied
2233 * @param newLength the length of the copy to be returned
2234 * @param newType the class of the copy to be returned
2236 * to obtain the specified length
2262 * @param original the array to be copied
2263 * @param newLength the length of the copy to be returned
2265 * to obtain the specified length
2286 * @param original the array to be copied
2287 * @param newLength the length of the copy to be returned
2289 * to obtain the specified length
2310 * @param original the array to be copied
2311 * @param newLength the length of the copy to be returned
2313 * to obtain the specified length
2334 * @param original the array to be copied
2335 * @param newLength the length of the copy to be returned
2337 * to obtain the specified length
2358 * @param original the array to be copied
2359 * @param newLength the length of the copy to be returned
2361 * to obtain the specified length
2382 * @param original the array to be copied
2383 * @param newLength the length of the copy to be returned
2385 * to obtain the specified length
2406 * @param original the array to be copied
2407 * @param newLength the length of the copy to be returned
2409 * to obtain the specified length
2430 * @param original the array to be copied
2431 * @param newLength the length of the copy to be returned
2433 * to obtain the specified length
2450 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2453 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2456 * greater than or equal to <tt>original.length - from</tt>. The length
2457 * of the returned array will be <tt>to - from</tt>.
2461 * @param original the array from which a range is to be copied
2462 * @param from the initial index of the range to be copied, inclusive
2463 * @param to the final index of the range to be copied, exclusive.
2466 * truncated or padded with nulls to obtain the required length
2469 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2473 public static <T> T[] copyOfRange(T[] original, int from, int to) {
2474 return copyOfRange(original, from, to, (Class<T[]>) original.getClass());
2482 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2485 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2488 * greater than or equal to <tt>original.length - from</tt>. The length
2489 * of the returned array will be <tt>to - from</tt>.
2492 * @param original the array from which a range is to be copied
2493 * @param from the initial index of the range to be copied, inclusive
2494 * @param to the final index of the range to be copied, exclusive.
2496 * @param newType the class of the copy to be returned
2498 * truncated or padded with nulls to obtain the required length
2501 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2508 public static <T,U> T[] copyOfRange(U[] original, int from, int to, Class<? extends T[]> newType) {
2509 int newLength = to - from;
2511 throw new IllegalArgumentException(from + " > " + to);
2525 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2528 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2531 * greater than or equal to <tt>original.length - from</tt>. The length
2532 * of the returned array will be <tt>to - from</tt>.
2534 * @param original the array from which a range is to be copied
2535 * @param from the initial index of the range to be copied, inclusive
2536 * @param to the final index of the range to be copied, exclusive.
2539 * truncated or padded with zeros to obtain the required length
2542 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2546 public static byte[] copyOfRange(byte[] original, int from, int to) {
2547 int newLength = to - from;
2549 throw new IllegalArgumentException(from + " > " + to);
2561 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2564 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2567 * greater than or equal to <tt>original.length - from</tt>. The length
2568 * of the returned array will be <tt>to - from</tt>.
2570 * @param original the array from which a range is to be copied
2571 * @param from the initial index of the range to be copied, inclusive
2572 * @param to the final index of the range to be copied, exclusive.
2575 * truncated or padded with zeros to obtain the required length
2578 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2582 public static short[] copyOfRange(short[] original, int from, int to) {
2583 int newLength = to - from;
2585 throw new IllegalArgumentException(from + " > " + to);
2597 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2600 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2603 * greater than or equal to <tt>original.length - from</tt>. The length
2604 * of the returned array will be <tt>to - from</tt>.
2606 * @param original the array from which a range is to be copied
2607 * @param from the initial index of the range to be copied, inclusive
2608 * @param to the final index of the range to be copied, exclusive.
2611 * truncated or padded with zeros to obtain the required length
2614 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2618 public static int[] copyOfRange(int[] original, int from, int to) {
2619 int newLength = to - from;
2621 throw new IllegalArgumentException(from + " > " + to);
2633 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2636 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2639 * greater than or equal to <tt>original.length - from</tt>. The length
2640 * of the returned array will be <tt>to - from</tt>.
2642 * @param original the array from which a range is to be copied
2643 * @param from the initial index of the range to be copied, inclusive
2644 * @param to the final index of the range to be copied, exclusive.
2647 * truncated or padded with zeros to obtain the required length
2650 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2654 public static long[] copyOfRange(long[] original, int from, int to) {
2655 int newLength = to - from;
2657 throw new IllegalArgumentException(from + " > " + to);
2669 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2672 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2675 * greater than or equal to <tt>original.length - from</tt>. The length
2676 * of the returned array will be <tt>to - from</tt>.
2678 * @param original the array from which a range is to be copied
2679 * @param from the initial index of the range to be copied, inclusive
2680 * @param to the final index of the range to be copied, exclusive.
2683 * truncated or padded with null characters to obtain the required length
2686 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2690 public static char[] copyOfRange(char[] original, int from, int to) {
2691 int newLength = to - from;
2693 throw new IllegalArgumentException(from + " > " + to);
2705 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2708 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2711 * greater than or equal to <tt>original.length - from</tt>. The length
2712 * of the returned array will be <tt>to - from</tt>.
2714 * @param original the array from which a range is to be copied
2715 * @param from the initial index of the range to be copied, inclusive
2716 * @param to the final index of the range to be copied, exclusive.
2719 * truncated or padded with zeros to obtain the required length
2722 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2726 public static float[] copyOfRange(float[] original, int from, int to) {
2727 int newLength = to - from;
2729 throw new IllegalArgumentException(from + " > " + to);
2741 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2744 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2747 * greater than or equal to <tt>original.length - from</tt>. The length
2748 * of the returned array will be <tt>to - from</tt>.
2750 * @param original the array from which a range is to be copied
2751 * @param from the initial index of the range to be copied, inclusive
2752 * @param to the final index of the range to be copied, exclusive.
2755 * truncated or padded with zeros to obtain the required length
2758 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2762 public static double[] copyOfRange(double[] original, int from, int to) {
2763 int newLength = to - from;
2765 throw new IllegalArgumentException(from + " > " + to);
2777 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2780 * (<tt>to</tt>), which must be greater than or equal to <tt>from</tt>,
2783 * greater than or equal to <tt>original.length - from</tt>. The length
2784 * of the returned array will be <tt>to - from</tt>.
2786 * @param original the array from which a range is to be copied
2787 * @param from the initial index of the range to be copied, inclusive
2788 * @param to the final index of the range to be copied, exclusive.
2791 * truncated or padded with false elements to obtain the required length
2794 * @throws IllegalArgumentException if <tt>from &gt; to</tt>
2798 public static boolean[] copyOfRange(boolean[] original, int from, int to) {
2799 int newLength = to - from;
2801 throw new IllegalArgumentException(from + " > " + to);
2811 * Returns a fixed-size list backed by the specified array. (Changes to
2812 * the returned list "write through" to the array.) This method acts
2817 * <p>This method also provides a convenient way to create a fixed-size
2818 * list initialized to contain several elements:
2905 * @param a the array whose hash value to compute
2934 * @param a the array whose hash value to compute
2961 * @param a the array whose hash value to compute
2988 * @param a the array whose hash value to compute
3015 * @param a the array whose hash value to compute
3042 * @param a the array whose hash value to compute
3069 * @param a the array whose hash value to compute
3096 * @param a the array whose hash value to compute
3116 * acceptable to invoke this method on an array that contains itself as an
3124 * <p>The value returned by this method is equal to the value that would
3128 * @param a the array whose content-based hash code to compute
3149 * It is therefore unacceptable to invoke this method on an array that
3158 * <p>The computation of the value returned by this method is similar to
3169 * @param a the array whose deep-content-based hash code to compute
3211 * equal</i> to one another. Unlike the {@link #equals(Object[],Object[])}
3216 * are <tt>null</tt>, or if they refer to arrays that contain the same
3237 * @param a1 one array to be tested for equality
3238 * @param a2 the other array to be tested for equality
3302 * space). Elements are converted to strings as by
3306 * @param a the array whose string representation to return
3332 * space). Elements are converted to strings as by
3336 * @param a the array whose string representation to return
3362 * space). Elements are converted to strings as by
3366 * @param a the array whose string representation to return
3392 * space). Elements are converted to strings as by
3396 * @param a the array whose string representation to return
3422 * by a space). Elements are converted to strings as by
3426 * @param a the array whose string representation to return
3452 * space). Elements are converted to strings as by
3456 * @param a the array whose string representation to return
3482 * space). Elements are converted to strings as by
3486 * @param a the array whose string representation to return
3513 * space). Elements are converted to strings as by
3517 * @param a the array whose string representation to return
3540 * If the array contains other arrays as elements, they are converted to
3545 * <p>The value returned by this method is equal to the value that would
3549 * @param a the array whose string representation to return
3576 * designed for converting multidimensional arrays to strings.
3581 * followed by a space). Elements are converted to strings as by
3586 * converted to a string as by invoking the appropriate overloading of
3588 * reference type, it is converted to a string as by invoking
3592 * as an element, or contains an indirect reference to itself through one
3593 * or more levels of arrays, the self-reference is converted to the string
3595 * to itself would be rendered as <tt>"[[...]]"</tt>.
3600 * @param a the array whose string representation to return