List of utility methods to do String Join
Map | joinValues(Map Joins each collection of values in a given Map into their String representation, with a given separator between each value. if (map == null || map.isEmpty()) { return Collections.emptyMap(); LinkedHashMap<K, String> out = new LinkedHashMap<K, String>(); for (Map.Entry<K, V> e : map.entrySet()) { out.put(e.getKey(), join(e.getValue(), separator)); return out; ... |
String | joinWithSeparation(String a, String separator, String b) Appends two strings, inserting separator if either is empty if (a.length() == 0) return b; if (b.length() == 0) return a; return a + separator + b; |
String | merge(ArrayList pArrayList, String pJoin) merge String lReturn = ""; if (pArrayList.size() > 0) { lReturn += (String) pArrayList.get(0); for (int i = 1; i < pArrayList.size(); i++) { lReturn += pJoin + (String) pArrayList.get(i); return lReturn; ... |
void | mergeDependencies(Set bundleDeps, List deps, Map disjointSets) merge Dependencies if (deps != null) { bundleDeps.addAll(deps); Iterator iter = deps.iterator(); while (iter.hasNext()) { String name = (String) iter.next(); mergeDependencies(bundleDeps, (List) disjointSets.get(name), disjointSets); |
String | prefixed_join(String padder, Vector prefixejoin StringBuffer sb = new StringBuffer(); for (Iterator<String> iter = v.iterator(); iter.hasNext();) { sb.append(padder); if (quoted) { sb.append('"'); sb.append((String) iter.next()); if (quoted) { ... |
String | strjoin(String sep, String... args) Concatentate string, using a separator return join(sep, args);
|
String | strjoinNL(String... args) strjoin with a newline as the separator return join("\n", args); |