Package: groovy.lang

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

- groovy.lang.MapWithDefault

- All Implemented Interfaces and Traits:
    Map

      public final class MapWithDefault<K, V>
      extends Object
      implements Map

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

  Since:
    1.7.1

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `clear()`
    `` | `public boolean` | `containsKey(Object key)`
    `` | `public boolean` | `containsValue(Object value)`
    `` | `public Set<Map.Entry<K, V>>` | `entrySet()`
    `` | `public boolean` | `equals(Object obj)`
    `` | `public V` | `get(Object key)`
    `` | `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()`

  - ### Inherited Methods Summary

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

- - ### Method Detail

    - #### @Override public void clear()

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

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

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

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

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

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

    - #### @Override public boolean isEmpty()

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

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

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

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

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

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

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