| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static < type of the array element T> T[] | Returns: array, which will contain the new element. Either new array instance, if passed array didn't contain the element, or the same array instance, if the element is already present in the array.array array, T element to add element)Add unique element to the array. |
| public static < type of the array element T> T[] | Returns: array, which will contain the new element. Either new array instance, if passed array didn't contain the element, or the same array instance, if the element is already present in the array.array array, final T element to add element, final boolean if passed element is equal to some element in the array then depending on this
parameter it will be replaced or not with the passed element. replaceElementIfEquals)Add unique element to the array. |
| public static int | |
| public static < type of the array element T> int | |
| public static < type of the array element T> T[] | Returns: array, which won't contain the element. Either new array instance, if passed array contains the element, or the same array instance, if the element wasn't present in the array. null will be returned if the last element was removed from the passed array.array array, Object the element to remove element)Removes the element from the array. |
| ArrayUtils | back to summary |
|---|---|
| public ArrayUtils() | |
| addUnique | back to summary |
|---|---|
| public static <T> T[] addUnique(T[] array, T element) Add unique element to the array.
| |
| addUnique | back to summary |
|---|---|
| public static <T> T[] addUnique(final T[] array, final T element, final boolean replaceElementIfEquals) Add unique element to the array.
| |
| binarySearch | back to summary |
|---|---|
| public static int binarySearch(final int[] a, final int fromIndex, final int toIndex, final int key) | |
| indexOf | back to summary |
|---|---|
| public static <T> int indexOf(T[] array, Object element) Return the element index in the array.
| |
| remove | back to summary |
|---|---|
| public static <T> T[] remove(T[] array, Object element) Removes the element from the array.
| |