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 voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()booleanequals(java.lang.Object obj)Vget(java.lang.Object key)inthashCode()booleanisEmpty()java.util.Set<K>keySet()static <K, V> java.util.Map<K,V>newInstance(java.util.Map<K,V> m, Closure initClosure)Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> m)Vremove(java.lang.Object key)intsize()java.util.Collection<V>values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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()
-