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 type
V - The value type
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>

public class FormattedHashMap<K,V> extends LinkedHashMap<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:
  • Constructor Details

    • FormattedHashMap

      public FormattedHashMap()
      Create a FormattedHashMap with default formatting.
    • FormattedHashMap

      public FormattedHashMap(String format)
      Create a FormattedHashMap with optional format string
      Parameters:
      format - The format string to use for formatting the value, or null to use the default toString() method.
  • Method Details