List of utility methods to do List Join
List | join(List join try { args.addAll(0, command); return args; } catch (Exception e) { ArrayList<String> commands = new ArrayList<String>(args.size() + command.size()); commands.addAll(command); commands.addAll(args); return commands; ... |
String | join(List join if (elements.isEmpty()) return "[]"; StringBuilder ret = new StringBuilder(); for (String element : elements) ret.append(", ").append(element); return "[" + ret.substring(2) + "]"; |
String | join(List Creates a backslash escaped string, joining all the items. StringBuilder sb = new StringBuilder(items.size() << 3); boolean first = true; for (String item : items) { if (first) { first = false; } else { sb.append(separator); for (int i = 0; i < item.length(); i++) { char ch = item.charAt(i); if (ch == '\\' || ch == separator) { sb.append('\\'); sb.append(ch); return sb.toString(); |
String | join(List join a string list into a single string StringBuilder sb = new StringBuilder(); boolean start = true; for (String s : l) { if (start) { start = false; } else { sb.append(joiner); sb.append(s); return sb.toString(); |
String | join(List join StringBuilder sb = new StringBuilder(); for (String string : lines) { sb.append(string); sb.append(delim); return sb.toString(); |
String | join(List join return join(list, null);
|
String | join(List join return join(list, getDefaultSeparator());
|
String | join(List join String rtn; if (list.isEmpty()) { rtn = ""; } else { StringBuilder sb = new StringBuilder(); for (String string : list) { sb.append(string).append(","); rtn = sb.substring(0, sb.length() - 1); return rtn; |
String | join(List Joins the given list into a comma-separated string. if (list == null) return null; StringBuilder joined = new StringBuilder(); boolean first = true; for (String element : list) { if (first) first = false; else ... |
String | join(List join return join(list, " "); |