Android Utililty Methods Array Remove

List of utility methods to do Array Remove


The list of methods to do Array Remove are organized into topic(s).


short[]removeElement(short[] array, short element)

Removes the first occurrence of the specified element from the specified array.

int index = indexOf(array, element);
if (index == INDEX_NOT_FOUND) {
    return clone(array);
return remove(array, index);
int[]removeInt(int[] cur, int val)
remove Int
if (cur == null) {
    return null;
final int N = cur.length;
for (int i = 0; i < N; i++) {
    if (cur[i] == val) {
        int[] ret = new int[N - 1];
        if (i > 0) {