Android 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

Stringconcatenate(String separator, T... values)
concatenate
StringBuilder builder = new StringBuilder();
if (values != null) {
    for (T value : values) {
        builder.append(separator).append(value.toString());
    builder.delete(0, separator.length());
return builder.toString();
...
T[]join(final Class pClass, final T[]... pArrays)
join
if (pArrays == null) {
    return null;
final int arrayCount = pArrays.length;
if (arrayCount == 0) {
    return null;
} else if (arrayCount == 1) {
    return pArrays[0];
...
Stringjoin(long[] follows)
join
StringBuilder buf = new StringBuilder(11 * follows.length);
for (long follow : follows) {
    if (0 != buf.length()) {
        buf.append(",");
    buf.append(follow);
return buf.toString();
...
StringgetList(long[] s, String separator, String quote)
get List
int len = s.length;
StringBuffer sb = new StringBuffer(len * 8);
for (int i = 0; i < len; i++) {
    sb.append(quote);
    sb.append(s[i]);
    sb.append(quote);
    if (i + 1 < len) {
        sb.append(separator);
...
Stringjoin(int[] follows)
join
StringBuffer buf = new StringBuffer(11 * follows.length);
for (int follow : follows) {
    if (0 != buf.length()) {
        buf.append(",");
    buf.append(follow);
return buf.toString();
...
Stringjoin(long[] follows)
join
StringBuffer buf = new StringBuffer(11 * follows.length);
for (long follow : follows) {
    if (0 != buf.length()) {
        buf.append(",");
    buf.append(follow);
return buf.toString();
...
Stringjoin(String[] track)
join
StringBuffer buf = new StringBuffer(11 * track.length);
for (String str : track) {
    if (0 != buf.length()) {
        buf.append(",");
    buf.append(str);
return buf.toString();
...
byte[]join(byte[] a1, byte[] a2)
join
byte[] result = new byte[a1.length + a2.length];
System.arraycopy(a1, 0, result, 0, a1.length);
System.arraycopy(a2, 0, result, a1.length, a2.length);
return result;
int[]join(int[] a1, int[] a2)
join
int[] result = new int[a1.length + a2.length];
System.arraycopy(a1, 0, result, 0, a1.length);
System.arraycopy(a2, 0, result, a1.length, a2.length);
return result;