groovy.lang
Class MapWithDefault<K,V>
java.lang.Object
   groovy.lang.MapWithDefault<K,V>
groovy.lang.MapWithDefault<K,V>
- All Implemented Interfaces: 
- Map<K,V>
- public final class MapWithDefault<K,V> 
- extends Object- implements Map<K,V>
A wrapper for Map which allows a default value to be specified.
- Since:
- 1.7.1
- Author:
- Paul King
 
| Nested classes/interfaces inherited from interface java.util.Map | 
| Map.Entry<K,V> | 
 
 
 
newInstance
public static <K,V> Map<K,V> newInstance(Map<K,V> m,
                                         Closure initClosure)
- 
 
- 
 
size
public int size()
- 
- Specified by:
- sizein interface- Map<K,V>
 
- 
 
isEmpty
public boolean isEmpty()
- 
- Specified by:
- isEmptyin interface- Map<K,V>
 
- 
 
containsKey
public boolean containsKey(Object key)
- 
- Specified by:
- containsKeyin interface- Map<K,V>
 
- 
 
containsValue
public boolean containsValue(Object value)
- 
- Specified by:
- containsValuein interface- Map<K,V>
 
- 
 
get
public V get(Object key)
- 
- Specified by:
- getin interface- Map<K,V>
 
- 
 
put
public V put(K key,
             V value)
- 
- Specified by:
- putin interface- Map<K,V>
 
- 
 
remove
public V remove(Object key)
- 
- Specified by:
- removein interface- Map<K,V>
 
- 
 
putAll
public void putAll(Map<? extends K,? extends V> m)
- 
- Specified by:
- putAllin interface- Map<K,V>
 
- 
 
clear
public void clear()
- 
- Specified by:
- clearin interface- Map<K,V>
 
- 
 
keySet
public Set<K> keySet()
- 
- Specified by:
- keySetin interface- Map<K,V>
 
- 
 
values
public Collection<V> values()
- 
- Specified by:
- valuesin interface- Map<K,V>
 
- 
 
entrySet
public Set<Map.Entry<K,V>> entrySet()
- 
- Specified by:
- entrySetin interface- Map<K,V>
 
- 
 
equals
public boolean equals(Object obj)
- 
- Specified by:
- equalsin interface- Map<K,V>
- Overrides:
- equalsin class- Object
 
- 
 
hashCode
public int hashCode()
- 
- Specified by:
- hashCodein interface- Map<K,V>
- Overrides:
- hashCodein class- Object
 
-