org.springframework.util

## 类 LinkedMultiValueMap<K,V>

- java.lang.Object
- - org.springframework.util.LinkedMultiValueMap<K,V>

- 类型参数:
    `K` - the key type
    `V` - the value element type
  所有已实现的接口:
    Serializable, Cloneable, Map<K,List<V>>, MultiValueMap<K,V>

      public class LinkedMultiValueMap<K,V>
      extends Object
      implements MultiValueMap<K,V>, Serializable, Cloneable

  Simple implementation of `MultiValueMap` that wraps a `LinkedHashMap`, storing multiple values in a `LinkedList`.

  This Map implementation is generally not thread-safe. It is primarily designed for data structures exposed from request objects, for use in a single thread only.

  从以下版本开始:
    3.0
  作者:
    Arjen Poutsma, Juergen Hoeller
  另请参阅:
    序列化表格

- - ### 嵌套类概要

    - ### 从接口继承的嵌套类/接口 java.util.Map

      `Map.Entry<K,V>`

  - ### 构造器概要

    构造器
    构造器和说明
    `LinkedMultiValueMap()` Create a new LinkedMultiValueMap that wraps a `LinkedHashMap`.
    `LinkedMultiValueMap(int initialCapacity)` Create a new LinkedMultiValueMap that wraps a `LinkedHashMap` with the given initial capacity.
    `LinkedMultiValueMap(Map<K,List<V>> otherMap)` Copy constructor: Create a new LinkedMultiValueMap with the same mappings as the specified Map.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `add(K key, V value)` Add the given single value to the current list of values for the given key.
    `void` | `addAll(K key, List<? extends V> values)` Add all the values of the given list to the current list of values for the given key.
    `void` | `addAll(MultiValueMap<K,V> values)` Add all the values of the given `MultiValueMap` to the current values.
    `void` | `clear()`
    `LinkedMultiValueMap<K,V>` | `clone()` Create a regular copy of this Map.
    `boolean` | `containsKey(Object key)`
    `boolean` | `containsValue(Object value)`
    `LinkedMultiValueMap<K,V>` | `deepCopy()` Create a deep copy of this Map.
    `Set<Map.Entry<K,List<V>>>` | `entrySet()`
    `boolean` | `equals(Object obj)`
    `List<V>` | `get(Object key)`
    `V` | `getFirst(K key)` Return the first value for the given key.
    `int` | `hashCode()`
    `boolean` | `isEmpty()`
    `Set<K>` | `keySet()`
    `List<V>` | `put(K key, List<V> value)`
    `void` | `putAll(Map<? extends K,? extends List<V>> map)`
    `List<V>` | `remove(Object key)`
    `void` | `set(K key, V value)` Set the given single value under the given key.
    `void` | `setAll(Map<K,V> values)` Set the given values under.
    `int` | `size()`
    `Map<K,V>` | `toSingleValueMap()` Return a `Map` with the first values contained in this `MultiValueMap`.
    `String` | `toString()`
    `Collection<List<V>>` | `values()`

    - ### 从类继承的方法 java.lang.Object

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

    - ### 从接口继承的方法 java.util.Map

      `compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll`

- - ### 构造器详细资料

    - #### LinkedMultiValueMap

          public LinkedMultiValueMap()

      Create a new LinkedMultiValueMap that wraps a `LinkedHashMap`.

    - #### LinkedMultiValueMap

          public LinkedMultiValueMap(int initialCapacity)

      Create a new LinkedMultiValueMap that wraps a `LinkedHashMap` with the given initial capacity.
      参数:
        `initialCapacity` - the initial capacity

    - #### LinkedMultiValueMap

          public LinkedMultiValueMap(Map<K,List<V>> otherMap)

      Copy constructor: Create a new LinkedMultiValueMap with the same mappings as the specified Map. Note that this will be a shallow copy; its value-holding List entries will get reused and therefore cannot get modified independently.
      参数:
        `otherMap` - the Map whose mappings are to be placed in this Map
      另请参阅:
        `clone()`, `deepCopy()`

  - ### 方法详细资料

    - #### getFirst

          @Nullable
          public V getFirst(K key)

      从接口复制的说明: `MultiValueMap`
      Return the first value for the given key.
      指定者:
        `getFirst` 在接口中 `MultiValueMap<K,V>`
      参数:
        `key` - the key
      返回:
        the first value for the specified key, or `null` if none

    - #### add

          public void add(K key,
                          @Nullable
                          V value)

      从接口复制的说明: `MultiValueMap`
      Add the given single value to the current list of values for the given key.
      指定者:
        `add` 在接口中 `MultiValueMap<K,V>`
      参数:
        `key` - the key
        `value` - the value to be added

    - #### addAll

          public void addAll(K key,
                             List<? extends V> values)

      从接口复制的说明: `MultiValueMap`
      Add all the values of the given list to the current list of values for the given key.
      指定者:
        `addAll` 在接口中 `MultiValueMap<K,V>`
      参数:
        `key` - they key
        `values` - the values to be added

    - #### addAll

          public void addAll(MultiValueMap<K,V> values)

      从接口复制的说明: `MultiValueMap`
      Add all the values of the given `MultiValueMap` to the current values.
      指定者:
        `addAll` 在接口中 `MultiValueMap<K,V>`
      参数:
        `values` - the values to be added

    - #### set

          public void set(K key,
                          @Nullable
                          V value)

      从接口复制的说明: `MultiValueMap`
      Set the given single value under the given key.
      指定者:
        `set` 在接口中 `MultiValueMap<K,V>`
      参数:
        `key` - the key
        `value` - the value to set

    - #### setAll

          public void setAll(Map<K,V> values)

      从接口复制的说明: `MultiValueMap`
      Set the given values under.
      指定者:
        `setAll` 在接口中 `MultiValueMap<K,V>`
      参数:
        `values` - the values.

    - #### toSingleValueMap

          public Map<K,V> toSingleValueMap()

      从接口复制的说明: `MultiValueMap`
      Return a `Map` with the first values contained in this `MultiValueMap`.
      指定者:
        `toSingleValueMap` 在接口中 `MultiValueMap<K,V>`
      返回:
        a single value representation of this map

    - #### size

          public int size()

      指定者:
        `size` 在接口中 `Map<K,List<V>>`

    - #### isEmpty

          public boolean isEmpty()

      指定者:
        `isEmpty` 在接口中 `Map<K,List<V>>`

    - #### containsKey

          public boolean containsKey(Object key)

      指定者:
        `containsKey` 在接口中 `Map<K,List<V>>`

    - #### containsValue

          public boolean containsValue(Object value)

      指定者:
        `containsValue` 在接口中 `Map<K,List<V>>`

    - #### get

          @Nullable
          public List<V> get(Object key)

      指定者:
        `get` 在接口中 `Map<K,List<V>>`

    - #### put

          @Nullable
          public List<V> put(K key,
                                        List<V> value)

      指定者:
        `put` 在接口中 `Map<K,List<V>>`

    - #### remove

          @Nullable
          public List<V> remove(Object key)

      指定者:
        `remove` 在接口中 `Map<K,List<V>>`

    - #### putAll

          public void putAll(Map<? extends K,? extends List<V>> map)

      指定者:
        `putAll` 在接口中 `Map<K,List<V>>`

    - #### clear

          public void clear()

      指定者:
        `clear` 在接口中 `Map<K,List<V>>`

    - #### keySet

          public Set<K> keySet()

      指定者:
        `keySet` 在接口中 `Map<K,List<V>>`

    - #### values

          public Collection<List<V>> values()

      指定者:
        `values` 在接口中 `Map<K,List<V>>`

    - #### entrySet

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

      指定者:
        `entrySet` 在接口中 `Map<K,List<V>>`

    - #### deepCopy

          public LinkedMultiValueMap<K,V> deepCopy()

      Create a deep copy of this Map.
      返回:
        a copy of this Map, including a copy of each value-holding List entry (consistently using an independent modifiable `LinkedList` for each entry) along the lines of `MultiValueMap.addAll` semantics
      从以下版本开始:
        4.2
      另请参阅:
        `addAll(MultiValueMap)`, `clone()`

    - #### clone

          public LinkedMultiValueMap<K,V> clone()

      Create a regular copy of this Map.
      覆盖:
        `clone` 在类中 `Object`
      返回:
        a shallow copy of this Map, reusing this Map's value-holding List entries (even if some entries are shared or unmodifiable) along the lines of standard `Map.put` semantics
      从以下版本开始:
        4.2
      另请参阅:
        `put(Object, List)`, `putAll(Map)`, `LinkedMultiValueMap(Map)`, `deepCopy()`

    - #### equals

          public boolean equals(Object obj)

      指定者:
        `equals` 在接口中 `Map<K,List<V>>`
      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      指定者:
        `hashCode` 在接口中 `Map<K,List<V>>`
      覆盖:
        `hashCode` 在类中 `Object`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`