Package groovy.lang
Class MapWithDefault<K,V>
- java.lang.Object
-
- groovy.lang.MapWithDefault<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
public final class MapWithDefault<K,V> extends java.lang.Object implements java.util.Map<K,V>
A wrapper for Map which allows a default value to be specified.- Since:
- 1.7.1
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
boolean
equals(java.lang.Object obj)
V
get(java.lang.Object key)
int
hashCode()
boolean
isEmpty()
java.util.Set<K>
keySet()
static <K,V>
java.util.Map<K,V>newInstance(java.util.Map<K,V> m, Closure initClosure)
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
V
remove(java.lang.Object key)
int
size()
java.util.Collection<V>
values()
-
-
-
Method Detail
-
newInstance
public static <K,V> java.util.Map<K,V> newInstance(java.util.Map<K,V> m, Closure initClosure)
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
values
public java.util.Collection<V> values()
-
equals
public boolean equals(java.lang.Object obj)
-
-