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
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K extends java.lang.Object,V extends java.lang.Object>
-
Method Summary
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()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
newInstance
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
public boolean containsKey(java.lang.Object key) -
containsValue
public boolean containsValue(java.lang.Object value) -
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
public boolean equals(java.lang.Object obj) -
hashCode
public int hashCode()
-