List of utility methods to do List Join
String | join(List Joins a list of strings. int size = strings.size(); if (size == 0) { return ""; StringBuilder sb = new StringBuilder(strings.size() * strings.get(0).length()); int index = 0; int lastIndex = size - 1; for (String string : strings) { ... |
String | join(List join StringBuilder sb = new StringBuilder(); for (Iterator<String> i = strings.iterator(); i.hasNext();) { sb.append(i.next()).append(i.hasNext() ? separator : ""); return sb.toString(); |
String | join(List join if (strings == null) { return ""; StringBuffer sb = new StringBuffer(); for (int i = 0, m = strings.size(); i < m; i++) { String string = strings.get(i); if (string == null) { string = ""; ... |
String | join(List Join the list of strings with the passed in delimiter. if (stringsToJoin == null) { return null; StringBuilder sb = new StringBuilder(stringsToJoin.size() * 30); for (int i = 0; i < stringsToJoin.size(); i++) { if (i > 0) { sb.append(delimiter); addToBuilderAndEscapeDelimiter(stringsToJoin.get(i), delimiter, sb); return sb.toString(); |
String | join(List join if (strList == null || strList.isEmpty()) return ""; if (strList.size() == 1) return strList.get(0); StringBuilder sb = new StringBuilder(); for (String s : strList) { if (sb.length() > 0) sb.append(separator); ... |
String | join(List Join a list of strings using a specified separator. StringBuilder builder = new StringBuilder(); for (final Iterator<String> i = strList.iterator(); i.hasNext();) { final String s = i.next(); builder.append(s); if (i.hasNext()) builder.append(sep); return builder.toString(); ... |
String | join(List join StringBuilder result = new StringBuilder(); if (!tokens.isEmpty()) { result.append(tokens.get(0)); for (String token : tokens.subList(1, tokens.size())) { result.append(sep); result.append(token); return result.toString(); |
String | join(List Joins the set of tokens in the provided list into a single string. return (join(tokens, null, null, separator));
|
String | join(List Combine tokens with a specified separator. StringBuilder sb = new StringBuilder(); if (tokens != null && separator != null) { for (String token : tokens) { if (sb.length() > 0) { sb.append(separator); sb.append(token); return sb.toString(); |
String | join(List join return join(values, ", "); |