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 SummaryNested classes/interfaces inherited from interface java.util.Mapjava.util.Map.Entry<K extends java.lang.Object,V extends java.lang.Object>
- 
Method SummaryModifier 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.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Method Details- 
newInstance
- 
sizepublic int size()
- 
isEmptypublic boolean isEmpty()
- 
containsKeypublic boolean containsKey(java.lang.Object key)
- 
containsValuepublic boolean containsValue(java.lang.Object value)
- 
get
- 
put
- 
remove
- 
putAll
- 
clearpublic void clear()
- 
keySet
- 
values
- 
entrySet
- 
equalspublic boolean equals(java.lang.Object obj)
- 
hashCodepublic int hashCode()
 
-