class SettingsMap extends java.lang.Object
A map which falls back to defaults for any elements not available on self The object delegates most calls to an internal settings map, but implements parts of the Map interface to read from both self and the supplied defaults object.
- type of keys in the map - type of values in the map| Constructor and description |
|---|
SettingsMap
(java.util.Map<K, V> defaults) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
boolean |
containsKey(java.lang.Object key)Returns true if this map contains a mapping for the specified key. |
|
boolean |
containsValue(java.lang.Object value)Returns true if this map maps one or more keys to the specified value. |
|
java.util.Set<Map.Entry<K, V>> |
entrySet()Returns a Set view of the mappings contained in this map. |
|
V |
get(java.lang.Object key)Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. |
|
V |
getOrDefault(java.lang.Object key, V defaultValue)Returns the value to which the specified key is mapped, or defaultValue if this map contains no mapping for the key. |
|
boolean |
isEmpty()Returns true if this map contains no key-value mappings. |
|
java.util.Set<K> |
keySet()Returns a Set view of the keys contained in this map. |
|
int |
size()Returns the number of key-value mappings in this map. |
|
java.util.Collection<V> |
values()Returns a Collection view of the values contained in this map. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Returns true if this map contains a mapping for the specified key.
key - key whose presence in this map is to be testedReturns true if this map maps one or more keys to the specified value.
value - value whose presence in this map is to be testedReturns a Set view of the mappings contained in this map.
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
key - the key whose associated value is to be returnedReturns the value to which the specified key is mapped, or defaultValue if this map contains no mapping for the key.
key - the key whose associated value is to be returneddefaultValue - the default mapping of the keyReturns true if this map contains no key-value mappings.
Returns a Set view of the keys contained in this map.
Returns the number of key-value mappings in this map.
Returns a Collection view of the values contained in this map.
Groovy Documentation