I am looking for a nice way to pretty-print a Map.
Map
map.toString() gives me: {key1=value1, key2=value2, key3=value3}
map.toString()
{key1=value1, key2=value2, key3=value3}
I
Apache libraries to the rescue!
MapUtils.debugPrint(System.out, "myMap", map);
All you need Apache commons-collections library (project link)
Maven users can add the library using this dependency:
commons-collections commons-collections 3.2.1