Lines Matching refs:element

32      * Appends an element to the end of the array, growing the array if there is no more room.
33 * @param array The array to which to append the element. This must NOT be null.
36 * @param element The element to append.
37 * @return the array to which the element was appended. This may be different than the given
40 public static <T> T[] append(T[] array, int currentSize, T element) {
50 array[currentSize] = element;
57 public static int[] append(int[] array, int currentSize, int element) {
65 array[currentSize] = element;
72 public static long[] append(long[] array, int currentSize, long element) {
80 array[currentSize] = element;
87 public static boolean[] append(boolean[] array, int currentSize, boolean element) {
95 array[currentSize] = element;
100 * Inserts an element into the array at the specified index, growing the array if there is no
103 * @param array The array to which to append the element. Must NOT be null.
106 * @param element The element to insert.
107 * @return the array to which the element was appended. This may be different than the given
110 public static <T> T[] insert(T[] array, int currentSize, int index, T element) {
115 array[index] = element;
123 newArray[index] = element;
131 public static int[] insert(int[] array, int currentSize, int index, int element) {
136 array[index] = element;
142 newArray[index] = element;
150 public static long[] insert(long[] array, int currentSize, int index, long element) {
155 array[index] = element;
161 newArray[index] = element;
169 public static boolean[] insert(boolean[] array, int currentSize, int index, boolean element) {
174 array[index] = element;
180 newArray[index] = element;