List of utility methods to do List Join
String | joinLong(List join Long final StringBuilder sb = new StringBuilder(); String separator = ""; for (Long f : lst) { sb.append(separator); separator = prefix; sb.append(f); return sb.toString(); ... |
String | joinNiceString(List join Nice String StringBuilder stringbuilder = new StringBuilder(); int i = 0; for (String s : strings) { if (i > 0) { if (i == strings.size() - 1) { stringbuilder.append(" and "); } else { stringbuilder.append(", "); ... |
List | joinRecords(List first, List second, String key) check each element of first list, and compare it to each element of second list. if (first != null && second != null) { for (int i = 0; i < first.size(); i++) { Map record1 = (Map) first.get(i); for (Iterator iterator1 = second.iterator(); iterator1.hasNext();) { Map record2 = (Map) iterator1.next(); if (record2.get(key) != null && record2.get(key).equals(record1.get(key))) { record1.putAll(record2); break; ... |
String | joinRelativePath(List Construct a relative path from the given components StringBuilder builder = new StringBuilder(); for (String component : components) { if (builder.length() > 0) builder.append('/'); builder.append(component); return builder.toString(); |
CharSequence | joinSegments(List Joins segments from startIndex to endIndex-1. StringBuilder sb = new StringBuilder(); appendSegments(sb, segments, startIndex, endIndex); return sb; |
String | joinString(java.util.List join String StringBuffer s = new StringBuffer(); boolean first = true; for (String v : values) { if (!first) { s.append(delimiter); s.append(v); first = false; ... |
String | joinString(List array, String symbol) join String String result = ""; if (array != null) { for (int i = 0; i < array.size(); i++) { String temp = array.get(i).toString(); if (temp != null && temp.trim().length() > 0) result += (temp + symbol); if (result.length() > 1) ... |
String | joinString(List> objs, String separator) Create a string for a list of objects, with a specified separator, e.g. String s = ""; boolean first = true; for (Object obj : objs) { if (first) { first = false; } else { s += separator; s += obj.toString(); return s; |
String | joinString(List join String StringBuilder builder = new StringBuilder(); for (String l : val) { builder.append(l); builder.append(","); return builder.toString().substring(0, builder.toString().length() - 1); |
String | joinStringList(String delimiter, List join String List String result = ""; boolean isFirst = true; for (String s : stringList) { if (!isFirst) { result = result + delimiter; isFirst = false; result = result + s; ... |