Home | History | Annotate | Download | only in util

Lines Matching refs:size

35      * @param size   the size of the arrays to be checked.
38 public static boolean equal(byte[] array1, byte[] array2, int size)
40 for (int index = 0; index < size; index++)
56 * @param size the size of the arrays to be checked.
59 public static boolean equal(short[] array1, short[] array2, int size)
61 for (int index = 0; index < size; index++)
77 * @param size the size of the arrays to be checked.
80 public static boolean equal(int[] array1, int[] array2, int size)
82 for (int index = 0; index < size; index++)
98 * @param size the size of the arrays to be checked.
101 public static boolean equal(Object[] array1, Object[] array2, int size)
103 for (int index = 0; index < size; index++)
134 * @param size the size of the arrays to be checked.
137 public static boolean equalOrNull(Object[] array1, Object[] array2, int size)
141 equal(array1, array2, size);
148 * @param size the size of the array to be taken into account.
151 public static int hashCode(byte[] array, int size)
155 for (int index = 0; index < size; index++)
167 * @param size the size of the array to be taken into account.
170 public static int hashCode(short[] array, int size)
174 for (int index = 0; index < size; index++)
186 * @param size the size of the array to be taken into account.
189 public static int hashCode(int[] array, int size)
193 for (int index = 0; index < size; index++)
205 * @param size the size of the array to be taken into account.
208 public static int hashCode(Object[] array, int size)
212 for (int index = 0; index < size; index++)
237 * @param size the size of the array to be taken into account.
240 public static int hashCodeOrNull(Object[] array, int size)
242 return array == null ? 0 : hashCode(array, size);
249 * @param size1 the size of the first array.
251 * @param size2 the size of the second array.
283 * @param size1 the size of the first array.
285 * @param size2 the size of the second array.
317 * @param size1 the size of the first array.
319 * @param size2 the size of the second array.
351 * @param size1 the size of the first array.
353 * @param size2 the size of the second array.
380 * Ensures the given array has a given size.
382 * @param size the target size of the array.
385 public static boolean[] extendArray(boolean[] array, int size)
388 if (array.length >= size)
394 boolean[] newArray = new boolean[size];
405 * Ensures the given array has a given size.
407 * @param size the target size of the array.
413 int size,
417 if (array.length >= size)
420 Arrays.fill(array, 0, size, initialValue);
425 array = new boolean[size];
429 Arrays.fill(array, 0, size, initialValue);
441 * @param size the original size of the array.
445 public static byte[] add(byte[] array, int size, byte element)
447 array = extendArray(array, size + 1);
449 array[size] = element;
459 * @param size the original size of the array.
464 public static byte[] insert(byte[] array, int size, int index, byte element)
466 array = extendArray(array, size + 1);
471 size - index);
482 * @param size the original size of the array.
485 public static void remove(byte[] array, int size, int index)
491 array[size - 1] = 0;
496 * Ensures the given array has a given size.
498 * @param size the target size of the array.
501 public static byte[] extendArray(byte[] array, int size)
504 if (array.length >= size)
510 byte[] newArray = new byte[size];
521 * Ensures the given array has a given size.
523 * @param size the target size of the array.
529 int size,
533 if (array.length >= size)
536 Arrays.fill(array, 0, size, initialValue);
541 array = new byte[size];
545 Arrays.fill(array, 0, size, initialValue);
557 * @param size the original size of the array.
561 public static short[] add(short[] array, int size, short element)
563 size + 1);
565 array[size] = element;
575 * @param size the original size of the array.
580 public static short[] insert(short[] array, int size, int index, short element)
582 array = extendArray(array, size + 1);
587 size - index);
598 * @param size the original size of the array.
601 public static void remove(short[] array, int size, int index)
607 array[size - 1] = 0;
612 * Ensures the given array has a given size.
614 * @param size the target size of the array.
617 public static short[] extendArray(short[] array, int size)
620 if (array.length >= size)
626 short[] newArray = new short[size];
637 * Ensures the given array has a given size.
639 * @param size the target size of the array.
645 int size,
649 if (array.length >= size)
652 Arrays.fill(array, 0, size, initialValue);
657 array = new short[size];
661 Arrays.fill(array, 0, size, initialValue);
673 * @param size the original size of the array.
677 public static int[] add(int[] array, int size, int element)
679 array = extendArray(array, size + 1);
681 array[size] = element;
691 * @param size the original size of the array.
696 public static int[] insert(int[] array, int size, int index, int element)
698 array = extendArray(array, size + 1);
703 size - index);
714 * @param size the original size of the array.
717 public static void remove(int[] array, int size, int index)
723 array[size - 1] = 0;
728 * Ensures the given array has a given size.
730 * @param size the target size of the array.
733 public static int[] extendArray(int[] array, int size)
736 if (array.length >= size)
742 int[] newArray = new int[size];
753 * Ensures the given array has a given size.
755 * @param size the target size of the array.
761 int size,
765 if (array.length >= size)
768 Arrays.fill(array, 0, size, initialValue);
773 array = new int[size];
777 Arrays.fill(array, 0, size, initialValue);
789 * @param size the original size of the array.
793 public static long[] add(long[] array, int size, long element)
795 array = extendArray(array, size + 1);
797 array[size] = element;
807 * @param size the original size of the array.
812 public static long[] insert(long[] array, int size, int index, long element)
814 array = extendArray(array, size + 1);
819 size - index);
830 * @param size the original size of the array.
833 public static void remove(long[] array, int size, int index)
839 array[size - 1] = 0;
844 * Ensures the given array has a given size.
846 * @param size the target size of the array.
849 public static long[] extendArray(long[] array, int size)
852 if (array.length >= size)
858 long[] newArray = new long[size];
869 * Ensures the given array has a given size.
871 * @param size the target size of the array.
877 int size,
881 if (array.length >= size)
884 Arrays.fill(array, 0, size, initialValue);
889 array = new long[size];
893 Arrays.fill(array, 0, size, initialValue);
905 * @param size the original size of the array.
909 public static Object[] add(Object[] array, int size, Object element)
911 array = extendArray(array, size + 1);
913 array[size] = element;
923 * @param size the original size of the array.
928 public static Object[] insert(Object[] array, int size, int index, Object element)
930 array = extendArray(array, size + 1);
935 size - index);
946 * @param size the original size of the array.
949 public static void remove(Object[] array, int size, int index)
955 array[size - 1] = null;
960 * Ensures the given array has a given size.
962 * @param size the target size of the array.
965 public static Object[] extendArray(Object[] array, int size)
968 if (array.length >= size)
974 Object[] newArray = (Object[])Array.newInstance(array.getClass().getComponentType(), size);
985 * Ensures the given array has a given size.
987 * @param size the target size of the array.
993 int size,
997 if (array.length >= size)
1000 Arrays.fill(array, 0, size, initialValue);
1005 array = (Object[])Array.newInstance(array.getClass().getComponentType(), size);
1009 Arrays.fill(array, 0, size, initialValue);