SpreadMap (Groovy 2.4.16)
Date: 2018-12-09

groovy.lang

## Class SpreadMap

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap
    - - groovy.lang.SpreadMap

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map

      public class SpreadMap
      extends java.util.HashMap

  Helper to turn a list with an even number of elements into a Map.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `java.util.Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpreadMap(java.util.List list)`
    `SpreadMap(java.util.Map map)`
    `SpreadMap(java.lang.Object[] values)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object that)`
    `boolean` | `equals(SpreadMap that)`
    `int` | `hashCode()`
    `java.lang.Object` | `put(java.lang.Object key, java.lang.Object value)`
    `void` | `putAll(java.util.Map t)`
    `java.lang.Object` | `remove(java.lang.Object key)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SpreadMap

          public SpreadMap(java.lang.Object[] values)

    - #### SpreadMap

          public SpreadMap(java.util.Map map)

    - #### SpreadMap

          public SpreadMap(java.util.List list)

      Parameters:
        `list` - the list to make spreadable
      Since:
        1.8.0

  - ### Method Detail

    - #### put

          public java.lang.Object put(java.lang.Object key,
                                      java.lang.Object value)

      Specified by:
        `put` in interface `java.util.Map`
      Overrides:
        `put` in class `java.util.HashMap`

    - #### remove

          public java.lang.Object remove(java.lang.Object key)

      Specified by:
        `remove` in interface `java.util.Map`
      Overrides:
        `remove` in class `java.util.HashMap`

    - #### putAll

          public void putAll(java.util.Map t)

      Specified by:
        `putAll` in interface `java.util.Map`
      Overrides:
        `putAll` in class `java.util.HashMap`

    - #### equals

          public boolean equals(java.lang.Object that)

      Specified by:
        `equals` in interface `java.util.Map`
      Overrides:
        `equals` in class `java.util.AbstractMap`

    - #### equals

          public boolean equals(SpreadMap that)

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `java.util.Map`
      Overrides:
        `hashCode` in class `java.util.AbstractMap`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.util.AbstractMap`
      Returns:
        the string expression of `this`