Lines Matching defs:original

2203      * valid in both the original array and the copy, the two arrays will
2205 * copy but not the original, the copy will contain <tt>null</tt>.
2207 * is greater than that of the original array.
2208 * The resulting array is of exactly the same class as the original array.
2210 * @param original the array to be copied
2212 * @return a copy of the original array, truncated or padded with nulls
2215 * @throws NullPointerException if <tt>original</tt> is null
2218 public static <T> T[] copyOf(T[] original, int newLength) {
2219 return (T[]) copyOf(original, newLength, original.getClass());
2225 * valid in both the original array and the copy, the two arrays will
2227 * copy but not the original, the copy will contain <tt>null</tt>.
2229 * is greater than that of the original array.
2232 * @param original the array to be copied
2235 * @return a copy of the original array, truncated or padded with nulls
2238 * @throws NullPointerException if <tt>original</tt> is null
2240 * <tt>original</tt> is not of a runtime type that can be stored in
2244 public static <T,U> T[] copyOf(U[] original, int newLength, Class<? extends T[]> newType) {
2248 System.arraycopy(original, 0, copy, 0,
2249 Math.min(original.length, newLength));
2256 * valid in both the original array and the copy, the two arrays will
2258 * copy but not the original, the copy will contain <tt>(byte)0</tt>.
2260 * is greater than that of the original array.
2262 * @param original the array to be copied
2264 * @return a copy of the original array, truncated or padded with zeros
2267 * @throws NullPointerException if <tt>original</tt> is null
2270 public static byte[] copyOf(byte[] original, int newLength) {
2272 System.arraycopy(original, 0, copy, 0,
2273 Math.min(original.length, newLength));
2280 * valid in both the original array and the copy, the two arrays will
2282 * copy but not the original, the copy will contain <tt>(short)0</tt>.
2284 * is greater than that of the original array.
2286 * @param original the array to be copied
2288 * @return a copy of the original array, truncated or padded with zeros
2291 * @throws NullPointerException if <tt>original</tt> is null
2294 public static short[] copyOf(short[] original, int newLength) {
2296 System.arraycopy(original, 0, copy, 0,
2297 Math.min(original.length, newLength));
2304 * valid in both the original array and the copy, the two arrays will
2306 * copy but not the original, the copy will contain <tt>0</tt>.
2308 * is greater than that of the original array.
2310 * @param original the array to be copied
2312 * @return a copy of the original array, truncated or padded with zeros
2315 * @throws NullPointerException if <tt>original</tt> is null
2318 public static int[] copyOf(int[] original, int newLength) {
2320 System.arraycopy(original, 0, copy, 0,
2321 Math.min(original.length, newLength));
2328 * valid in both the original array and the copy, the two arrays will
2330 * copy but not the original, the copy will contain <tt>0L</tt>.
2332 * is greater than that of the original array.
2334 * @param original the array to be copied
2336 * @return a copy of the original array, truncated or padded with zeros
2339 * @throws NullPointerException if <tt>original</tt> is null
2342 public static long[] copyOf(long[] original, int newLength) {
2344 System.arraycopy(original, 0, copy, 0,
2345 Math.min(original.length, newLength));
2352 * in both the original array and the copy, the two arrays will contain
2354 * the original, the copy will contain <tt>'\\u000'</tt>. Such indices
2356 * the original array.
2358 * @param original the array to be copied
2360 * @return a copy of the original array, truncated or padded with null characters
2363 * @throws NullPointerException if <tt>original</tt> is null
2366 public static char[] copyOf(char[] original, int newLength) {
2368 System.arraycopy(original, 0, copy, 0,
2369 Math.min(original.length, newLength));
2376 * valid in both the original array and the copy, the two arrays will
2378 * copy but not the original, the copy will contain <tt>0f</tt>.
2380 * is greater than that of the original array.
2382 * @param original the array to be copied
2384 * @return a copy of the original array, truncated or padded with zeros
2387 * @throws NullPointerException if <tt>original</tt> is null
2390 public static float[] copyOf(float[] original, int newLength) {
2392 System.arraycopy(original, 0, copy, 0,
2393 Math.min(original.length, newLength));
2400 * valid in both the original array and the copy, the two arrays will
2402 * copy but not the original, the copy will contain <tt>0d</tt>.
2404 * is greater than that of the original array.
2406 * @param original the array to be copied
2408 * @return a copy of the original array, truncated or padded with zeros
2411 * @throws NullPointerException if <tt>original</tt> is null
2414 public static double[] copyOf(double[] original, int newLength) {
2416 System.arraycopy(original, 0, copy, 0,
2417 Math.min(original.length, newLength));
2424 * valid in both the original array and the copy, the two arrays will
2426 * copy but not the original, the copy will contain <tt>false</tt>.
2428 * is greater than that of the original array.
2430 * @param original the array to be copied
2432 * @return a copy of the original array, truncated or padded with false elements
2435 * @throws NullPointerException if <tt>original</tt> is null
2438 public static boolean[] copyOf(boolean[] original, int newLength) {
2440 System.arraycopy(original, 0, copy, 0,
2441 Math.min(original.length, newLength));
2448 * and <tt>original.length</tt>, inclusive. The value at
2449 * <tt>original[from]</tt> is placed into the initial element of the copy
2450 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2451 * Values from subsequent elements in the original array are placed into
2454 * may be greater than <tt>original.length</tt>, in which case
2456 * greater than or equal to <tt>original.length - from</tt>. The length
2459 * The resulting array is of exactly the same class as the original array.
2461 * @param original the array from which a range is to be copied
2465 * @return a new array containing the specified range from the original array,
2468 * or {@code from > original.length}
2470 * @throws NullPointerException if <tt>original</tt> is null
2473 public static <T> T[] copyOfRange(T[] original, int from, int to) {
2474 return copyOfRange(original, from, to, (Class<T[]>) original.getClass());
2480 * and <tt>original.length</tt>, inclusive. The value at
2481 * <tt>original[from]</tt> is placed into the initial element of the copy
2482 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2483 * Values from subsequent elements in the original array are placed into
2486 * may be greater than <tt>original.length</tt>, in which case
2488 * greater than or equal to <tt>original.length - from</tt>. The length
2492 * @param original the array from which a range is to be copied
2497 * @return a new array containing the specified range from the original array,
2500 * or {@code from > original.length}
2502 * @throws NullPointerException if <tt>original</tt> is null
2504 * <tt>original</tt> is not of a runtime type that can be stored in
2508 public static <T,U> T[] copyOfRange(U[] original, int from, int to, Class<? extends T[]> newType) {
2515 System.arraycopy(original, from, copy, 0,
2516 Math.min(original.length - from, newLength));
2523 * and <tt>original.length</tt>, inclusive. The value at
2524 * <tt>original[from]</tt> is placed into the initial element of the copy
2525 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2526 * Values from subsequent elements in the original array are placed into
2529 * may be greater than <tt>original.length</tt>, in which case
2531 * greater than or equal to <tt>original.length - from</tt>. The length
2534 * @param original the array from which a range is to be copied
2538 * @return a new array containing the specified range from the original array,
2541 * or {@code from > original.length}
2543 * @throws NullPointerException if <tt>original</tt> is null
2546 public static byte[] copyOfRange(byte[] original, int from, int to) {
2551 System.arraycopy(original, from, copy, 0,
2552 Math.min(original.length - from, newLength));
2559 * and <tt>original.length</tt>, inclusive. The value at
2560 * <tt>original[from]</tt> is placed into the initial element of the copy
2561 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2562 * Values from subsequent elements in the original array are placed into
2565 * may be greater than <tt>original.length</tt>, in which case
2567 * greater than or equal to <tt>original.length - from</tt>. The length
2570 * @param original the array from which a range is to be copied
2574 * @return a new array containing the specified range from the original array,
2577 * or {@code from > original.length}
2579 * @throws NullPointerException if <tt>original</tt> is null
2582 public static short[] copyOfRange(short[] original, int from, int to) {
2587 System.arraycopy(original, from, copy, 0,
2588 Math.min(original.length - from, newLength));
2595 * and <tt>original.length</tt>, inclusive. The value at
2596 * <tt>original[from]</tt> is placed into the initial element of the copy
2597 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2598 * Values from subsequent elements in the original array are placed into
2601 * may be greater than <tt>original.length</tt>, in which case
2603 * greater than or equal to <tt>original.length - from</tt>. The length
2606 * @param original the array from which a range is to be copied
2610 * @return a new array containing the specified range from the original array,
2613 * or {@code from > original.length}
2615 * @throws NullPointerException if <tt>original</tt> is null
2618 public static int[] copyOfRange(int[] original, int from, int to) {
2623 System.arraycopy(original, from, copy, 0,
2624 Math.min(original.length - from, newLength));
2631 * and <tt>original.length</tt>, inclusive. The value at
2632 * <tt>original[from]</tt> is placed into the initial element of the copy
2633 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2634 * Values from subsequent elements in the original array are placed into
2637 * may be greater than <tt>original.length</tt>, in which case
2639 * greater than or equal to <tt>original.length - from</tt>. The length
2642 * @param original the array from which a range is to be copied
2646 * @return a new array containing the specified range from the original array,
2649 * or {@code from > original.length}
2651 * @throws NullPointerException if <tt>original</tt> is null
2654 public static long[] copyOfRange(long[] original, int from, int to) {
2659 System.arraycopy(original, from, copy, 0,
2660 Math.min(original.length - from, newLength));
2667 * and <tt>original.length</tt>, inclusive. The value at
2668 * <tt>original[from]</tt> is placed into the initial element of the copy
2669 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2670 * Values from subsequent elements in the original array are placed into
2673 * may be greater than <tt>original.length</tt>, in which case
2675 * greater than or equal to <tt>original.length - from</tt>. The length
2678 * @param original the array from which a range is to be copied
2682 * @return a new array containing the specified range from the original array,
2685 * or {@code from > original.length}
2687 * @throws NullPointerException if <tt>original</tt> is null
2690 public static char[] copyOfRange(char[] original, int from, int to) {
2695 System.arraycopy(original, from, copy, 0,
2696 Math.min(original.length - from, newLength));
2703 * and <tt>original.length</tt>, inclusive. The value at
2704 * <tt>original[from]</tt> is placed into the initial element of the copy
2705 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2706 * Values from subsequent elements in the original array are placed into
2709 * may be greater than <tt>original.length</tt>, in which case
2711 * greater than or equal to <tt>original.length - from</tt>. The length
2714 * @param original the array from which a range is to be copied
2718 * @return a new array containing the specified range from the original array,
2721 * or {@code from > original.length}
2723 * @throws NullPointerException if <tt>original</tt> is null
2726 public static float[] copyOfRange(float[] original, int from, int to) {
2731 System.arraycopy(original, from, copy, 0,
2732 Math.min(original.length - from, newLength));
2739 * and <tt>original.length</tt>, inclusive. The value at
2740 * <tt>original[from]</tt> is placed into the initial element of the copy
2741 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2742 * Values from subsequent elements in the original array are placed into
2745 * may be greater than <tt>original.length</tt>, in which case
2747 * greater than or equal to <tt>original.length - from</tt>. The length
2750 * @param original the array from which a range is to be copied
2754 * @return a new array containing the specified range from the original array,
2757 * or {@code from > original.length}
2759 * @throws NullPointerException if <tt>original</tt> is null
2762 public static double[] copyOfRange(double[] original, int from, int to) {
2767 System.arraycopy(original, from, copy, 0,
2768 Math.min(original.length - from, newLength));
2775 * and <tt>original.length</tt>, inclusive. The value at
2776 * <tt>original[from]</tt> is placed into the initial element of the copy
2777 * (unless <tt>from == original.length</tt> or <tt>from == to</tt>).
2778 * Values from subsequent elements in the original array are placed into
2781 * may be greater than <tt>original.length</tt>, in which case
2783 * greater than or equal to <tt>original.length - from</tt>. The length
2786 * @param original the array from which a range is to be copied
2790 * @return a new array containing the specified range from the original array,
2793 * or {@code from > original.length}
2795 * @throws NullPointerException if <tt>original</tt> is null
2798 public static boolean[] copyOfRange(boolean[] original, int from, int to) {
2803 System.arraycopy(original, from, copy, 0,
2804 Math.min(original.length - from, newLength));