List of utility methods to do List Join
String | joinStrings(Iterable same as #joinStrings(Iterable,String) , and default sep to empty string return joinStrings(list, ""); |
String | joinStrings(List aList, String aString) Returns a string by concatenating strings in given list separated by given string. StringBuffer sb = new StringBuffer(); for (int i = 0, iMax = aList.size(); i < iMax; i++) sb.append(i == 0 ? "" : aString).append(aList.get(i)); return sb.toString(); |
String | joinStrings(List This method takes a List if (list == null) return null; StringBuilder builder = new StringBuilder(list.get(0)); for (String s : list.subList(1, list.size())) { builder.append(delim).append(s); return builder.toString(); |
String | joinStrings(List Join an arraylist of strings into a single string using a separator if (strings == null) { return null; String res = ""; for (int i = 0; i < strings.size(); i++) { res += (i > 0) ? separator : ""; res += strings.get(i); return res; |
String | joinStrings(List Join the strings in strings together in sequence with separator between them.
if (strings == null || separator == null) { throw new NullPointerException(); if (strings.isEmpty()) { return ""; StringBuilder builder = new StringBuilder(strings.get(0)); for (String element : strings.subList(1, strings.size())) { ... |
String | joinStrings(String delim, List> strings) join Strings StringBuilder sb = new StringBuilder(); for (int i = 0; i < strings.size(); ++i) { sb.append(strings.get(i).toString()); if (i < strings.size() - 1) { sb.append(delim); return sb.toString(); ... |
String | joinStrings(String joiner, List join Strings return joinStrings(joiner, objects, false);
|
String | joinTextWithCommas(List join Text With Commas StringBuffer buf = new StringBuffer(); if (list.size() > 0) { Iterator<String> iterator = list.iterator(); for (int i = 0; iterator.hasNext(); i++) { String field = iterator.next(); buf.append(field); if (i < list.size()) buf.append(", "); ... |
boolean | joinThreads(List join Threads boolean interrupted = false; for (Thread curThread : threads) { try { curThread.join(); } catch (InterruptedException e) { e.printStackTrace(); interrupted = true; break; ... |
StringBuffer | joinTokens(final List Crudely join tokens together. final StringBuffer sb = new StringBuffer(); for (final String token : tokens) { sb.append(token); sb.append(" "); return sb; |