List of utility methods to do Map Print
void | printMap(Map mp) print Map Iterator it = mp.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pairs = (Map.Entry) it.next();
it.remove();
|
String | printMap(Map extends K, ? extends V> theMap) print Map StringBuilder theBuf = new StringBuilder(); for (Map.Entry<? extends K, ? extends V> entry : theMap.entrySet()) { theBuf.append(entry.getKey()); theBuf.append(" --> "); theBuf.append(entry.getValue()); theBuf.append(System.getProperty("line.separator")); return theBuf.toString(); ... |
void | printMap(Map, ?> mp) print Map Iterator<?> it = mp.entrySet().iterator(); while (it.hasNext()) { Entry<?, ?> pairs = (Entry<?, ?>) it.next(); Object obj = pairs.getValue(); if (obj instanceof int[]) { int[] seq = (int[]) obj; System.out.print(pairs.getKey() + " ="); for (int i = 0; i < seq.length; ++i) { ... |
void | printMap(Map print Map if (map == null) { System.out.println("NULL"); return; if (map.size() == 0) { System.out.println("EMPTY"); return; for (Map.Entry<K, V> entry : map.entrySet()) { System.out.println(entry.getKey() + " = " + entry.getValue()); |
void | printMap(Map print Map Set<Map.Entry<K, V>> resultsEntry = map.entrySet(); Iterator<Map.Entry<K, V>> iter = resultsEntry.iterator(); while (iter.hasNext()) { Map.Entry<K, V> result = iter.next(); System.out.println(result.getKey() + " = " + result.getValue()); |
void | printMap(Map To print given maps content with System.out.println , both keys and values are printed.
Set<Entry<Object, Object>> s = map.entrySet(); Iterator<Entry<Object, Object>> it = s.iterator(); while (it.hasNext()) { Map.Entry entry = it.next(); Object key = entry.getKey(); Object value = entry.getValue(); System.out.println(key.toString() + " => " + value.toString()); |
void | printMap(Map print Map for (Object key : map.keySet()) { println("key: " + key + " value: " + map.get(key)); |
void | printMap(Map print Map for (Map.Entry<String, Integer> entry : map.entrySet()) { System.out.println("[Key] : " + entry.getKey() + " [Value] : " + entry.getValue()); |
StringBuilder | printMap(Map print Map StringBuilder strBuilder = new StringBuilder(); Set<String> keySet = map.keySet(); List<String> keys = new ArrayList<>(keySet); strBuilder.append("{"); for (String key : keys) { strBuilder.append("\"" + key + "\":"); strBuilder.append(map.get(key).toString()); if (!key.equals(keys.get(keys.size() - 1))) { ... |
void | printMap(Map Prints the map. String log = "Parent"; if (depth > 0) { log = "Children"; StringBuilder str = new StringBuilder(); int loop = depth; while (loop > 0) { str.append('\t'); ... |