Android Utililty Methods Array Remove

List of utility methods to do Array Remove

Description

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

Method

short[]remove(short[] array, int index)

Removes the element at the specified position from the specified array.

return (short[]) remove((Object) array, index);
T[]removeElement(Class kind, T[] array, T element)
remove Element
if (array != null) {
    final int length = array.length;
    for (int i = 0; i < length; i++) {
        if (array[i] == element) {
            if (length == 1) {
                return null;
            T[] result = (T[]) Array.newInstance(kind, length - 1);
...
T[]removeElement(T[] array, Object 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);
boolean[]removeElement(boolean[] array, boolean 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);
byte[]removeElement(byte[] array, byte 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);
char[]removeElement(char[] array, char 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);
double[]removeElement(double[] array, double 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);
float[]removeElement(float[] array, float 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[]removeElement(int[] array, int 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);
long[]removeElement(long[] array, long 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);