Package: groovy.lang

## [Java] Class MapWithDefault<K, V>

- groovy.lang.MapWithDefault

- All Implemented Interfaces and Traits:
    Map

      public final class MapWithDefault
      extends Object

  A wrapper for Map which allows a default value to be specified.

  Authors:
    Paul King
  Since:
    1.7.1

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `clear()`
    `` | `boolean` | `containsKey(Object key)`
    `` | `boolean` | `containsValue(Object value)`
    `` | `Set<Map.Entry<K, V>>` | `entrySet()`
    `` | `boolean` | `equals(Object obj)`
    `` | `V` | `get(Object key)`
    `` | `int` | `hashCode()`
    `` | `boolean` | `isEmpty()`
    `` | `Set<K>` | `keySet()`
    `<K, V>` | `static Map<K, V>` | `newInstance(Map<K, V> m, Closure initClosure)`
    `` | `V` | `put(K key, V value)`
    `` | `void` | `putAll(Map<? extends K, ? extends V> m)`
    `` | `V` | `remove(Object key)`
    `` | `int` | `size()`
    `` | `Collection<V>` | `values()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### public void clear()

    - #### public boolean containsKey(Object key)

    - #### public boolean containsValue(Object value)

    - #### public Set<Map.Entry<K, V>> entrySet()

    - #### @Override public boolean equals(Object obj)

    - #### public V get(Object key)

    - #### @Override public int hashCode()

    - #### public boolean isEmpty()

    - #### public Set<K> keySet()

    - #### <K, V> public static Map<K, V> newInstance(Map<K, V> m, Closure initClosure)

    - #### public V put(K key, V value)

    - #### public void putAll(Map<? extends K, ? extends V> m)

    - #### public V remove(Object key)

    - #### public int size()

    - #### public Collection<V> values()