Android Utililty Methods Array Add

List of utility methods to do Array Add

Description

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

Method

int[]appendInt(int[] cur, int val)
append Int
if (cur == null) {
    return new int[] { val };
final int N = cur.length;
for (int i = 0; i < N; i++) {
    if (cur[i] == val) {
        return cur;
int[] ret = new int[N + 1];
System.arraycopy(cur, 0, ret, 0, N);
ret[N] = val;
return ret;
T[]arrayappend(T[] array, T[] append)
arrayappend
return arrayappend(array, append, append.length);
T[]arrayappend(T[] array, T[] append, int size)
arrayappend
array = arrayexpend(array, size);
System.arraycopy(append, 0, array, array.length - size, size);
return array;
byte[]arraybyteappend(byte[] array, byte[] append)
arraybyteappend
return arraybyteappend(array, append, append.length);
byte[]arraybyteappend(byte[] array, byte[] append, int size)
arraybyteappend
array = arraybyteexpend(array, size);
System.arraycopy(append, 0, array, array.length - size, size);
return array;
int[]arrayintappend(int[] array, int[] append)
arrayintappend
return arrayintappend(array, append, append.length);
int[]arrayintappend(int[] array, int[] append, int size)
arrayintappend
array = arrayintexpend(array, size);
System.arraycopy(append, 0, array, array.length - size, size);
return array;
byte[]append(byte[] data, byte[] adata)
append
if (data == null) {
    data = new byte[0];
int len = data.length;
if (adata == null) {
    return data;
int alen = adata.length;
...