@Equality public class ConfigMap extends Object
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.
ConfigKey
Constructor and Description |
---|
ConfigMap()
Constructs an empty map.
|
ConfigMap(ConfigMap copy)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
<T> T |
get(ConfigKey<T> key)
Reads the value associated with a given key.
|
int |
hashCode() |
Set<ConfigKey<?>> |
keySet()
Returns a set view of the keys explicitly written into the map.
|
<T> void |
put(ConfigKey<T> key,
T value)
Puts an entry into this map.
|
void |
putAll(ConfigMap config)
Copies all the entries from a given map into this map.
|
String |
toString() |
public ConfigMap()
public ConfigMap(ConfigMap copy)
copy
- map to copypublic <T> void put(ConfigKey<T> key, T value)
key
- keyvalue
- value to associate with keypublic void putAll(ConfigMap config)
config
- map to copypublic <T> T get(ConfigKey<T> key)
key
- keypublic Set<ConfigKey<?>> keySet()
Map.keySet()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.