Class ConfigMap
java.lang.Object
uk.ac.starlink.ttools.plot2.config.ConfigMap
- Direct Known Subclasses:
LoggingConfigMap
Map containing typed configuration keys.
Missing entries for a key are for most purposes treated as if the key is present with its default value. Null values may however be placed explicitly into the map.
Null keys are not supported.
Concurrency requirements: this map will get written in one thread (perhaps the Event Dispatch Thread), and after writing is complete may be concurrently in the same and different threads.
- Since:
- 22 Feb 2013
- Author:
- Mark Taylor
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ConfigMap
public ConfigMap()Constructs an empty map. -
ConfigMap
Copy constructor.- Parameters:
copy
- map to copy
-
-
Method Details
-
put
Puts an entry into this map.- Parameters:
key
- keyvalue
- value to associate with key
-
putAll
Copies all the entries from a given map into this map.- Parameters:
config
- map to copy
-
get
Reads the value associated with a given key. If the key is not present in the map, the default value for that key is returned.- Parameters:
key
- key- Returns:
- value earlier written to map, or default value
-
keySet
Returns a set view of the keys explicitly written into the map. Note that non-null (default) values may be read from the map even for keys absent from this set.- Returns:
- set of keys backed by map; supports removal operations
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-