Class FormattedHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.lsst.ccs.subsystem.focalplane.data.FormattedHashMap<K,V>
- Type Parameters:
K- The key typeV- The value type
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,V>
A LinkedHashMap which overrides toString to format one item per line.Useful
for returning from commands since it allows access to the map from a script,
but also formats it readably.
- Author:
- tonyj
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionCreate a FormattedHashMap with default formatting.FormattedHashMap(String format) Create a FormattedHashMap with optional format string -
Method Summary
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
FormattedHashMap
public FormattedHashMap()Create a FormattedHashMap with default formatting. -
FormattedHashMap
Create a FormattedHashMap with optional format string- Parameters:
format- The format string to use for formatting the value, ornullto use the default toString() method.
-
-
Method Details
-
toString
- Overrides:
toStringin classAbstractMap<K,V>
-