List of utility methods to do HashMap to String
String | toString(HashMap to String StringBuilder sb = new StringBuilder("["); for (Entry<Integer, Long> entry : map.entrySet()) { sb.append(entry.getKey() + ":" + entry.getValue() + " "); sb.append("]"); return sb.toString(); |
String[] | toStringArray(HashMap Convert a HashMap to string array String[] res = new String[syms.size()]; for (String sym : syms.keySet()) { res[syms.get(sym)] = sym; return res; |
String | toStringLong(HashMap to String Long String display = "["; for (Map.Entry<Long, Long> entry : map.entrySet()) { display += entry.getKey() + " : " + entry.getValue() + ", "; display = display.substring(0, display.length() - 2) + "]"; return display; |