List of utility methods to do Iterable Join
String | join(Iterable Joins a list strings into a single string. StringBuilder r = new StringBuilder(); for (Iterator<String> i = strings.iterator(); i.hasNext();) { r.append(i.next()); if (i.hasNext()) r.append(delimiter); return r.toString(); |
String | join(Iterable join StringBuilder builder = new StringBuilder(); if (strings != null) { Iterator<String> iter = strings.iterator(); while (iter.hasNext()) { String part = iter.next(); builder.append(part); if (iter.hasNext()) { builder.append(separator); ... |
String | join(Iterable Missing counterpart for String.split() StringBuilder b = new StringBuilder(); Iterator<T> i = array.iterator(); boolean first = true; while (i.hasNext()) { if (first) first = false; else b.append(joiner); ... |
String | join(Iterable join Iterator<T> it = coll.iterator(); String ret = ""; while (it.hasNext()) { ret = ret + it.next(); if (it.hasNext()) { ret = ret + sep; return ret; |
String | join(Iterable join Iterator<T> it = coll.iterator(); String ret = ""; while (it.hasNext()) { ret = ret + it.next(); if (it.hasNext()) { ret = ret + sep; return ret; |
String | join(Iterable join Iterator<T> it = coll.iterator(); String ret = ""; while (it.hasNext()) { ret = ret + it.next(); if (it.hasNext()) { ret = ret + sep; return ret; |
String | join(Iterable Joins into a string an iterable collection of objects by using a separator. if (coll == null) return ""; Iterator<T> it = coll.iterator(); if (!it.hasNext()) return ""; StringBuilder sb = new StringBuilder(it.next().toString()); while (it.hasNext()) { if (!isBlank(separator)) { ... |
String | join(Iterable join Iterator<T> i = items.iterator(); if (!i.hasNext()) return ""; StringBuilder sb = new StringBuilder(); sb.append(i.next()); while (i.hasNext()) { sb.append(delimiter); sb.append(i.next()); ... |
String | join(Iterable join Iterator<T> iterator = iterable.iterator(); if (!iterator.hasNext()) { return ""; StringBuilder stringBuilder = new StringBuilder(iterator.next().toString()); while (iterator.hasNext()) { stringBuilder.append(","); stringBuilder.append(iterator.next().toString()); ... |
String | join(Iterable Join a number of (string representations of) items to a single string using a delimiter StringBuilder builder = new StringBuilder(); Iterator<T> iter = parts.iterator(); while (iter.hasNext()) { builder.append(iter.next().toString()); if (!iter.hasNext()) { break; builder.append(delimiter); ... |