org.tinyjee.maven.dim.utils
Class PrintableMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.tinyjee.maven.dim.utils.PrintableMap<K,V>
- All Implemented Interfaces:
- Serializable, Cloneable, Map<K,V>
public class PrintableMap<K,V>
- extends LinkedHashMap<K,V>
Extends LinkedHashMap with the ability to print the map's contents as formatted string.
Contents are automatically printed to the build log when a non-existing key is queried or
when printContent()
is called.
- Author:
- Juergen_Kellerer, 2011-09-30
- See Also:
- Serialized Form
Methods inherited from interface java.util.Map |
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
PrintableMap
public PrintableMap(String name)
PrintableMap
public PrintableMap(Map<? extends K,? extends V> map,
String name)
get
public V get(Object key)
- Specified by:
get
in interface Map<K,V>
- Overrides:
get
in class LinkedHashMap<K,V>
printContent
public void printContent()
getContentAsString
public String getContentAsString()