List of utility methods to do Map Join
String | joinMap(Map, ?> map) join Map if (map.isEmpty()) { return ""; StringBuilder stringBuilder = new StringBuilder(); boolean notFirst = false; for (Map.Entry<?, ?> entry : map.entrySet()) { if (notFirst) { stringBuilder.append(','); ... |
String | joinMapToString(Map extends Object, ? extends Object> map, String sSeparator, String sMidSeparator) join Map To String StringBuilder sb = new StringBuilder(); Iterator it = map.entrySet().iterator(); boolean First = true; while (it.hasNext()) { Map.Entry tmpEntry = (Map.Entry) it.next(); if (First) { First = false; } else { ... |
Map | joinMapUnmodifiable(Map Join the two given maps to one by checking if one of the two maps already fulfills everything. if (first == null || first.isEmpty()) { if (second == null || second.isEmpty()) { return Collections.emptyMap(); } else { return Collections.unmodifiableMap(second); } else if (second == null || second.isEmpty()) { return Collections.unmodifiableMap(first); ... |
String | joinMapValue(Map join Map Value StringBuffer b = new StringBuffer(); for (Map.Entry<String, String> entry : map.entrySet()) { b.append(entry.getKey()); b.append('='); if (entry.getValue() != null) { b.append(entry.getValue()); b.append(connector); ... |
String | joinOnDelimiter(Map toJoin, char delimiter) Convert properties to a string representation, based on the specified delimiter. StringBuffer buf = new StringBuffer(); for (Iterator it = toJoin.entrySet().iterator(); it.hasNext();) { Map.Entry e = (Map.Entry) it.next(); String key = (String) e.getKey(); String value = (String) e.getValue(); buf.append(key); buf.append("="); buf.append(value); ... |
String | joinOnSemicolon(Map Convert properties to a string representation. return joinOnDelimiter(toJoin, SEMICOLON);
|
String | joinParameters(Map join Parameters StringBuilder bob = new StringBuilder(); for (Entry<String, String> e : params.entrySet()) { bob.append("&"); bob.append(e.getKey()); bob.append("="); bob.append(e.getValue()); return bob.substring(1); ... |