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(int[] follows)
join
StringBuilder buf = new StringBuilder(11 * follows.length);
for (int follow : follows) {
    if (0 != buf.length()) {
        buf.append(",");
    buf.append(follow);
return buf.toString();
...
long[]join(long[] a, long[] b)
join
long[] res = Arrays.copyOf(a, a.length + b.length);
System.arraycopy(b, 0, res, a.length, b.length);
return res;
Stringjoin(long[] array, String delim)
join
StringBuilder build = new StringBuilder();
for (long item : array) {
    build.append(delim);
    build.append(item);
return build.substring(delim.length());
Stringjoin(Object[] arguments)
join
return join(Arrays.asList(arguments));
Stringjoin(Object[] arr)
join
return join(arr, ",");
Stringjoin(Object[] arr, String separator)
Join array into string using separator For example: Utils.join(new String[]{"a", "b", "c"}, "+") => "a+b+c"
return join(arr, "", separator, "");
Stringjoin(Object[] arr, String separator)
join
StringBuffer buf = null;
for (int i = 0; i < arr.length; i++) { 
    if (buf == null)
        buf = new StringBuffer(arr[i].toString());
    else
        buf.append(separator).append(arr[i].toString());
return (buf == null) ? null : buf.toString();
...
Stringjoin(Object[] array)

Joins the elements of the provided array into a single String containing the provided list of elements.

No separator is added to the joined String.

return join(array, null);
Stringjoin(Object[] array)
join
return join(array, ", ");
Stringjoin(Object[] array)

Joins the elements of the provided array into a single String containing the provided list of elements.

return join(array, null);