|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.config.ConfigMap
@Equality public class ConfigMap
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.
ConfigKey
Constructor Summary | |
---|---|
ConfigMap()
Constructs an empty map. |
|
ConfigMap(ConfigMap copy)
Copy constructor. |
Method Summary | ||
---|---|---|
boolean |
equals(Object o)
|
|
|
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. |
|
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfigMap()
public ConfigMap(ConfigMap copy)
copy
- map to copyMethod Detail |
---|
public <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
- key
public Set<ConfigKey<?>> keySet()
Map.keySet()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |