Lines Matching defs:newLength

2211      * @param newLength the length of the copy to be returned
2214 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2218 public static <T> T[] copyOf(T[] original, int newLength) {
2219 return (T[]) copyOf(original, newLength, original.getClass());
2233 * @param newLength the length of the copy to be returned
2237 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2244 public static <T,U> T[] copyOf(U[] original, int newLength, Class<? extends T[]> newType) {
2246 ? (T[]) new Object[newLength]
2247 : (T[]) Array.newInstance(newType.getComponentType(), newLength);
2249 Math.min(original.length, newLength));
2263 * @param newLength the length of the copy to be returned
2266 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2270 public static byte[] copyOf(byte[] original, int newLength) {
2271 byte[] copy = new byte[newLength];
2273 Math.min(original.length, newLength));
2287 * @param newLength the length of the copy to be returned
2290 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2294 public static short[] copyOf(short[] original, int newLength) {
2295 short[] copy = new short[newLength];
2297 Math.min(original.length, newLength));
2311 * @param newLength the length of the copy to be returned
2314 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2318 public static int[] copyOf(int[] original, int newLength) {
2319 int[] copy = new int[newLength];
2321 Math.min(original.length, newLength));
2335 * @param newLength the length of the copy to be returned
2338 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2342 public static long[] copyOf(long[] original, int newLength) {
2343 long[] copy = new long[newLength];
2345 Math.min(original.length, newLength));
2359 * @param newLength the length of the copy to be returned
2362 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2366 public static char[] copyOf(char[] original, int newLength) {
2367 char[] copy = new char[newLength];
2369 Math.min(original.length, newLength));
2383 * @param newLength the length of the copy to be returned
2386 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2390 public static float[] copyOf(float[] original, int newLength) {
2391 float[] copy = new float[newLength];
2393 Math.min(original.length, newLength));
2407 * @param newLength the length of the copy to be returned
2410 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2414 public static double[] copyOf(double[] original, int newLength) {
2415 double[] copy = new double[newLength];
2417 Math.min(original.length, newLength));
2431 * @param newLength the length of the copy to be returned
2434 * @throws NegativeArraySizeException if <tt>newLength</tt> is negative
2438 public static boolean[] copyOf(boolean[] original, int newLength) {
2439 boolean[] copy = new boolean[newLength];
2441 Math.min(original.length, newLength));
2509 int newLength = to - from;
2510 if (newLength < 0)
2513 ? (T[]) new Object[newLength]
2514 : (T[]) Array.newInstance(newType.getComponentType(), newLength);
2516 Math.min(original.length - from, newLength));
2547 int newLength = to - from;
2548 if (newLength < 0)
2550 byte[] copy = new byte[newLength];
2552 Math.min(original.length - from, newLength));
2583 int newLength = to - from;
2584 if (newLength < 0)
2586 short[] copy = new short[newLength];
2588 Math.min(original.length - from, newLength));
2619 int newLength = to - from;
2620 if (newLength < 0)
2622 int[] copy = new int[newLength];
2624 Math.min(original.length - from, newLength));
2655 int newLength = to - from;
2656 if (newLength < 0)
2658 long[] copy = new long[newLength];
2660 Math.min(original.length - from, newLength));
2691 int newLength = to - from;
2692 if (newLength < 0)
2694 char[] copy = new char[newLength];
2696 Math.min(original.length - from, newLength));
2727 int newLength = to - from;
2728 if (newLength < 0)
2730 float[] copy = new float[newLength];
2732 Math.min(original.length - from, newLength));
2763 int newLength = to - from;
2764 if (newLength < 0)
2766 double[] copy = new double[newLength];
2768 Math.min(original.length - from, newLength));
2799 int newLength = to - from;
2800 if (newLength < 0)
2802 boolean[] copy = new boolean[newLength];
2804 Math.min(original.length - from, newLength));