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

int[]deleteSubset(int[] multiset, int[] subset)
Iterate over the elements in the subset and set the first elements to -1 in the multiset which equals the subset elements.
int size = multiset.length;
int[] setClone = new int[size];
System.arraycopy(multiset, 0, setClone, 0, size);
int k = 0;
for (int j = 0; j < subset.length; j++) {
    for (int i = k; i < setClone.length; i++) {
        if (subset[j] == setClone[i]) {
            setClone[i] = -1;
...
Objectremove(Object array, int index)

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

int length = getLength(array);
if (index < 0 || index >= length) {
    throw new IndexOutOfBoundsException("Index: " + index
            + ", Length: " + length);
Object result = Array.newInstance(array.getClass()
        .getComponentType(), length - 1);
System.arraycopy(array, 0, result, 0, index);
...
T[]remove(T[] array, int index)

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

return (T[]) remove((Object) array, index);
boolean[]remove(boolean[] array, int index)

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

return (boolean[]) remove((Object) array, index);
byte[]remove(byte[] array, int index)

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

return (byte[]) remove((Object) array, index);
char[]remove(char[] array, int index)

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

return (char[]) remove((Object) array, index);
double[]remove(double[] array, int index)

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

return (double[]) remove((Object) array, index);
float[]remove(float[] array, int index)

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

return (float[]) remove((Object) array, index);
int[]remove(int[] array, int index)

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

return (int[]) remove((Object) array, index);
long[]remove(long[] array, int index)

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

return (long[]) remove((Object) array, index);