org.springframework.util

## 类 LinkedCaseInsensitiveMap<V>

- java.lang.Object
- - org.springframework.util.LinkedCaseInsensitiveMap<V>

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

      public class LinkedCaseInsensitiveMap<V>
      extends Object
      implements Map<String,V>, Serializable, Cloneable

  `LinkedHashMap` variant that stores String keys in a case-insensitive manner, for example for key-based access in a results table.

  Preserves the original order as well as the original casing of keys, while allowing for contains, get and remove calls with any case of key.

  Does not support `null` keys.

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

- - ### 嵌套类概要

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

      `Map.Entry<K,V>`

  - ### 构造器概要

    构造器
    构造器和说明
    `LinkedCaseInsensitiveMap()` Create a new LinkedCaseInsensitiveMap that stores case-insensitive keys according to the default Locale (by default in lower case).
    `LinkedCaseInsensitiveMap(int initialCapacity)` Create a new LinkedCaseInsensitiveMap that wraps a `LinkedHashMap` with the given initial capacity and stores case-insensitive keys according to the default Locale (by default in lower case).
    `LinkedCaseInsensitiveMap(int initialCapacity, Locale locale)` Create a new LinkedCaseInsensitiveMap that wraps a `LinkedHashMap` with the given initial capacity and stores case-insensitive keys according to the given Locale (by default in lower case).
    `LinkedCaseInsensitiveMap(Locale locale)` Create a new LinkedCaseInsensitiveMap that stores case-insensitive keys according to the given Locale (by default in lower case).

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `clear()`
    `LinkedCaseInsensitiveMap<V>` | `clone()`
    `boolean` | `containsKey(Object key)`
    `boolean` | `containsValue(Object value)`
    `protected String` | `convertKey(String key)` Convert the given key to a case-insensitive key.
    `Set<Map.Entry<String,V>>` | `entrySet()`
    `boolean` | `equals(Object obj)`
    `V` | `get(Object key)`
    `Locale` | `getLocale()` Return the locale used by this `LinkedCaseInsensitiveMap`.
    `V` | `getOrDefault(Object key, V defaultValue)`
    `int` | `hashCode()`
    `boolean` | `isEmpty()`
    `Set<String>` | `keySet()`
    `V` | `put(String key, V value)`
    `void` | `putAll(Map<? extends String,? extends V> map)`
    `V` | `remove(Object key)`
    `protected boolean` | `removeEldestEntry(Map.Entry<String,V> eldest)` Determine whether this map should remove the given eldest entry.
    `int` | `size()`
    `String` | `toString()`
    `Collection<V>` | `values()`

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

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

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

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

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

    - #### LinkedCaseInsensitiveMap

          public LinkedCaseInsensitiveMap()

      Create a new LinkedCaseInsensitiveMap that stores case-insensitive keys according to the default Locale (by default in lower case).
      另请参阅:
        `convertKey(String)`

    - #### LinkedCaseInsensitiveMap

          public LinkedCaseInsensitiveMap(@Nullable
                                          Locale locale)

      Create a new LinkedCaseInsensitiveMap that stores case-insensitive keys according to the given Locale (by default in lower case).
      参数:
        `locale` - the Locale to use for case-insensitive key conversion
      另请参阅:
        `convertKey(String)`

    - #### LinkedCaseInsensitiveMap

          public LinkedCaseInsensitiveMap(int initialCapacity)

      Create a new LinkedCaseInsensitiveMap that wraps a `LinkedHashMap` with the given initial capacity and stores case-insensitive keys according to the default Locale (by default in lower case).
      参数:
        `initialCapacity` - the initial capacity
      另请参阅:
        `convertKey(String)`

    - #### LinkedCaseInsensitiveMap

          public LinkedCaseInsensitiveMap(int initialCapacity,
                                          @Nullable
                                          Locale locale)

      Create a new LinkedCaseInsensitiveMap that wraps a `LinkedHashMap` with the given initial capacity and stores case-insensitive keys according to the given Locale (by default in lower case).
      参数:
        `initialCapacity` - the initial capacity
        `locale` - the Locale to use for case-insensitive key conversion
      另请参阅:
        `convertKey(String)`

  - ### 方法详细资料

    - #### size

          public int size()

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

    - #### isEmpty

          public boolean isEmpty()

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

    - #### containsKey

          public boolean containsKey(Object key)

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

    - #### containsValue

          public boolean containsValue(Object value)

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

    - #### get

          @Nullable
          public V get(Object key)

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

    - #### getOrDefault

          @Nullable
          public V getOrDefault(Object key,
                                           V defaultValue)

      指定者:
        `getOrDefault` 在接口中 `Map<String,V>`

    - #### put

          @Nullable
          public V put(String key,
                                  @Nullable
                                  V value)

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

    - #### putAll

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

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

    - #### remove

          @Nullable
          public V remove(Object key)

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

    - #### clear

          public void clear()

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

    - #### keySet

          public Set<String> keySet()

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

    - #### values

          public Collection<V> values()

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

    - #### entrySet

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

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

    - #### clone

          public LinkedCaseInsensitiveMap<V> clone()

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

    - #### equals

          public boolean equals(Object obj)

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

    - #### hashCode

          public int hashCode()

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

    - #### toString

          public String toString()

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

    - #### getLocale

          public Locale getLocale()

      Return the locale used by this `LinkedCaseInsensitiveMap`. Used for case-insensitive key conversion.
      从以下版本开始:
        4.3.10
      另请参阅:
        `LinkedCaseInsensitiveMap(Locale)`, `convertKey(String)`

    - #### convertKey

          protected String convertKey(String key)

      Convert the given key to a case-insensitive key.

      The default implementation converts the key to lower-case according to this Map's Locale.

      参数:
        `key` - the user-specified key
      返回:
        the key to use for storing
      另请参阅:
        `String.toLowerCase(Locale)`

    - #### removeEldestEntry

          protected boolean removeEldestEntry(Map.Entry<String,V> eldest)

      Determine whether this map should remove the given eldest entry.
      参数:
        `eldest` - the candidate entry
      返回:
        `true` for removing it, `false` for keeping it
      另请参阅:
        `LinkedHashMap.removeEldestEntry(java.util.Map.Entry<K, V>)`