List of utility methods to do Map to String
String | toString(Map, ?> attributes) to String StringBuilder buffer = new StringBuilder(); if (attributes != null && attributes.size() > 0) { for (Map.Entry<?, ?> entrySet : attributes.entrySet()) { buffer.append(entrySet.getKey()); buffer.append("=\""); buffer.append(entrySet.getValue().toString()); buffer.append("\""); buffer.append(" "); ... |
String | toString(Map, ?> map) to String if (map == null) { return null; @SuppressWarnings("rawtypes") Iterator iter = map.entrySet().iterator(); StringBuffer sb = new StringBuffer(); while (iter.hasNext()) { @SuppressWarnings("rawtypes") ... |
String | toString(Map, ?> map) to String if (map == null || map.size() == 0) { return "{ }"; StringBuffer sb = new StringBuffer(); sb.append("{"); Iterator it = map.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); ... |
String | toString(Map, ?> map) Create string representation of a map. return toString(map, EMPTY_STRING);
|
String | toString(Map m) Convert the given map to a string. StringBuffer sb = new StringBuffer(); sb.append("[\n"); for (A key : m.keySet()) { sb.append(" " + key + " => " + m.get(key) + "\n"); sb.append("]"); return sb.toString(); |
String | toString(Map map) Returns a String showing the type and first few elements of a map if (map == null) { return "null"; StringBuilder sB = new StringBuilder(); sB.append(map.getClass().getSimpleName()); sB.append("("); int i = 0; for (Map.Entry<A, B> item : map.entrySet()) { ... |
String | toString(Map to String if (map == null) return ""; if (map.isEmpty()) return "{}"; StringBuilder result = new StringBuilder(); for (Map.Entry<K, V> entry : map.entrySet()) { result.append(String.format(", %s -> %s ", entry.getKey().toString(), entry.getValue().toString())); return "{" + result.substring(1) + "}"; |
String | toString(Map to String StringBuilder sb = new StringBuilder(); sb.append("["); boolean first = true; for (Map.Entry<K, V> entry : map.entrySet()) { if (first) { first = false; } else { sb.append(","); ... |
String | toString(Map Returns a String representation for a Map StringBuilder retval = new StringBuilder(); if (map != null) { retval.append("[\n"); Iterator<Entry<K, V>> iterator = map.entrySet().iterator(); while (iterator != null && iterator.hasNext()) { try { Entry<K, V> entry = iterator.next(); retval.append(" " + entry.toString() + "\n"); ... |
String | toString(Map to String if (m == null || m.isEmpty()) { return ""; StringBuilder sb = new StringBuilder(); int n = m.size(); for (Object key : m.keySet()) { String stringKey = String.valueOf(key); sb.append('"').append(escapeQuotes(stringKey)).append('"'); ... |