Java Utililty Methods Array Join

List of utility methods to do Array Join

Description

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

Method

Stringjoin(T[] objs, String splitString)
join
return join(objs, 0, objs.length, splitString);
T[]joinArrays(T[] a, T[] b)
join Arrays
T[] res = Arrays.copyOf(a, a.length + b.length);
System.arraycopy(b, 0, res, a.length, b.length);
return res;
String[]joinAttributes(final String[] atts1, final String[] atts2)
Creates a set of attribute names from the two input lists of names, maintaining the order of the first list and appending the non repeated names of the second.
if (atts1 == null && atts2 == null) {
    return null;
final List atts = new LinkedList();
if (atts1 != null) {
    atts.addAll(Arrays.asList(atts1));
if (atts2 != null) {
...
StringjoinByComma(String[] values)
join By Comma
return joinBy(values, ",");
byte[]joinByteArrays(final byte[] array1, byte[] array2)
join Byte Arrays
byte[] result = Arrays.copyOf(array1, array1.length + array2.length);
System.arraycopy(array2, 0, result, array1.length, array2.length);
return result;
byte[]joinBytesArrays(byte[]... args)
join Bytes Arrays
return joinBytesArrays(Arrays.asList(args));
Stringjoiner(int[] ints, String split)
joiner
if (ints.length == 0) {
    return EMPTY;
StringBuilder sb = new StringBuilder(String.valueOf(ints[0]));
for (int i = 1; i < ints.length; i++) {
    sb.append(split);
    sb.append(ints[i]);
return sb.toString();
double[][]joinParetos(double[][] pareto1, double[][] pareto2)
join Paretos
if (pareto1 == null) {
    if (pareto2 != null)
        return pareto2;
} else if (pareto2 == null) {
    if (pareto1 != null)
        return pareto1;
if (pareto1[0].length != pareto2[0].length) {
...
StringjoinString(String delimiter, String[] strings)
join String
ArrayList<String> list = new ArrayList<String>(Arrays.asList(strings));
list.removeAll(Arrays.asList("", null));
int len = list.size();
if (len == 1) {
    return list.get(0);
StringBuilder sb = new StringBuilder();
--len;
...
StringjoinString(String[] array)
join String
return joinString(Arrays.asList(array), ",");