List of utility methods to do List Join
String | joinList(List list, String separator) join List String rtVal = ""; if (separator == null) separator = ","; Iterator it = list.iterator(); while (it.hasNext()) { rtVal += (String) it.next() + separator; if (rtVal.length() > 1) ... |
String | joinList(List joins a list of elements eg [a, b, c] into a string of the form: "a", "b", "c" if the list is empty: returns "\"\"" (that is, a string containing two " characters, not an empty string) return "\"" + String.join("\", \"", items) + "\""; |
String | joinList(List join List Iterator<String> i = list.iterator(); if (i.hasNext() == false) { return ""; StringBuffer res = new StringBuffer(); res.append(i.next()); while (i.hasNext()) { res.append(glue + i.next()); ... |
String | joinList(List join List if (list == null) { return null; int size = list.size(); if (size == 0) { return ""; } else if (size == 1) { return list.get(0); ... |
String | joinList(List Join a List of Strings with a separator. if (parts == null || parts.isEmpty()) { return ""; StringBuilder sb = new StringBuilder(); boolean first = true; for (String part : parts) { if (first) { first = false; ... |
String | joinList(String separater, List Join a list of string together String result = ""; for (int i = 0; i < list.size(); i++) { result = result + list.get(i) + separater; if (!result.equals("")) { result = result.substring(0, result.length() - separater.length()); return result; ... |
List | joinLists(final List
Joins the items of multiple lists into one list. if (lists.size() == 0) { return new ArrayList<GPItem>(0); final List<GPItem> joined = new ArrayList<GPItem>(lists.size() * lists.get(0).size()); for (final List<GPItem> list : lists) { joined.addAll(list); return joined; ... |
List | joinLists(List Join together 2 ordered lists of doubles into a single, ordered list without duplicates. List<Double> C = new ArrayList<Double>(); int nA = 0; int NA = A.size(); double a = A.get(nA); int nB = 0; int NB = B.size(); double b = B.get(nB); while (nA < NA || nB < NB) { ... |
List | joinLists(List join Lists List<T> result = new ArrayList<T>(); for (List<T> list2 : list) { result.addAll(list2); return result; |
String | joinListToString(List extends Object> lsStr, String sSeparator) join List To String StringBuilder builder = new StringBuilder(); boolean firstOcc = true; if (lsStr.size() == 1 && lsStr.get(0).equals("")) { return ""; for (int i = 0; i < lsStr.size(); i++) { if (firstOcc) { firstOcc = false; ... |