The list of methods to do Array Combine are organized into topic(s).
Object[]
combine(int size, Object[]... arrays) combine
int offset = 0;
Object[] target = new Object[size];
for (Object[] arr : arrays) {
System.arraycopy(arr, 0, target, offset, arr.length);
offset += arr.length;
return target;
int[]
combine(int[][] arr, int[] terms) Combine elements in a given two level array and an optional second array of terms, combine them all in a single array of terms
int c = 0;
if (arr != null)
for (int i = 0; i < arr.length; i++)
c += arr[i].length;
if (terms != null)
c += terms.length;
int[] r = new int[c];
c = 0;
...
void
combine(Object[] array1, Object[] array2, Object[] combinedArray) combine
System.arraycopy(array1, 0, combinedArray, 0, array1.length);
System.arraycopy(array2, 0, combinedArray, array1.length, array2.length);
Object[]
combine(Object[] first, Object[] last) combine
if (first.length == 0 && last.length == 0) {
return null;
Object[] result = new Object[first.length + last.length];
System.arraycopy(first, 0, result, 0, first.length);
System.arraycopy(last, 0, result, first.length, last.length);
return result;
String
combine(Object[] objects, String glue) combine
int l = objects.length;
int m = l - 1;
int x;
if (l == 0) {
return null;
StringBuilder r = new StringBuilder();
for (x = 0; x < m; x++) {
...
float
combineAlpha(float[] partsAlpha, int partsN) Combine multiple alpha values.
float sumAlpha = 0.f;
int count = 0;
for (int i = 0; i < partsN; i++) {
if (!Float.isNaN(partsAlpha[i])) {
sumAlpha += partsAlpha[i];
count++;
if (count > 0) {
return sumAlpha / count;
} else {
return 0.f;
float[]
combineArrays(float[]... arrays) combine Arrays
int size = arrays[0].length;
float[] result = new float[arrays.length * arrays[0].length];
for (int i = 0; i < arrays.length; i++) {
for (int j = 0; j < size; j++) {
result[i * size + j] = arrays[i][j];
return result;
...
byte[]
combineByteArray(byte[] one, byte[] two) combine Byte Array
byte[] out = new byte[one.length + two.length];
System.arraycopy(one, 0, out, 0, one.length);
System.arraycopy(two, 0, out, one.length, two.length);
return out;