List of utility methods to do List Join
String | join(Iterable Joins the Strings of the provided array into a single String. if (list == null) { return ""; StringBuilder builder = new StringBuilder(); Iterator<String> iter = list.iterator(); while (iter.hasNext()) { builder.append(iter.next()); if (!iter.hasNext()) { ... |
List | join(List a, List b) Used by common.ext. List l = new ArrayList(); if (a != null) { l.addAll(a); if (b != null) { l.addAll(b); return l; ... |
String | join(List a_quotedArgs) join StringBuffer joined = new StringBuffer(); int quotedSize = a_quotedArgs.size(); for (int index = 0; index < quotedSize; index++) { if (index > 0) { joined.append(' '); joined.append(a_quotedArgs.get(index)); return joined.toString(); |
String | join(List array, String separator) join if (array == null) { return null; if (separator == null) { separator = EMPTY; StringBuffer buf = new StringBuffer(); for (int i = 0; i < array.size(); i++) { ... |
String | join(List elements, String joinWith) join if (elements == null || elements.size() == 0) return null; StringBuilder buffer = new StringBuilder(56); for (Iterator i$ = elements.iterator(); i$.hasNext(); buffer.append(joinWith)) { String str = (String) i$.next(); buffer.append(str); return buffer.toString(); ... |
String | join(List elements, String sep) "join" a List of Strings into a single string, with each string separated by a defined separator string. StringBuffer sb = new StringBuffer(); boolean first = true; Iterator iter = elements.iterator(); while (iter.hasNext()) { String element = (String) iter.next(); if (!first) { sb.append(sep); } else { ... |
String | join(List items, String separator) join StringBuilder sb = new StringBuilder(); for (int i = 0; i < items.size(); i++) { boolean lastItem = i == items.size() - 1; sb.append(items.get(i)); if (!lastItem) { sb.append(separator); return sb.toString(); |
String | join(List l, String sep) join String[] fields = (String[]) l.toArray(new String[l.size()]); return join(fields, sep); |
String | join(List list, char separator) join if (list == null) { return ""; int size = list.size(); if (size == 0) { return ""; if (size == 1) { ... |
String | join(List list, String delim) join if (list == null || list.size() < 1) return null; StringBuffer buf = new StringBuffer(); Iterator i = list.iterator(); while (i.hasNext()) { buf.append((String) i.next()); if (i.hasNext()) buf.append(delim); ... |