public class LinkedCaseInsensitiveMap<V> extends Object implements Map<String,V>, Serializable, Cloneable
| 构造器和说明 |
|---|
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 |
putIfAbsent(String key,
V value) |
V |
remove(Object key) |
protected boolean |
removeEldestEntry(Map.Entry<String,V> eldest)
Determine whether this map should remove the given eldest entry.
|
int |
size() |
V |
supplyIfAbsent(String key,
Supplier<? super String,? extends V> supplier) |
String |
toString() |
Collection<V> |
values() |
compute, computeIfAbsent, computeIfPresent, forEach, merge, remove, replace, replace, replaceAllpublic LinkedCaseInsensitiveMap()
convertKey(String)public LinkedCaseInsensitiveMap(@Nullable Locale locale)
locale - the Locale to use for case-insensitive key conversionconvertKey(String)public LinkedCaseInsensitiveMap(int initialCapacity)
LinkedHashMap
with the given initial capacity and stores case-insensitive keys
according to the default Locale (by default in lower case).initialCapacity - the initial capacityconvertKey(String)public LinkedCaseInsensitiveMap(int initialCapacity,
@Nullable
Locale locale)
LinkedHashMap
with the given initial capacity and stores case-insensitive keys
according to the given Locale (by default in lower case).initialCapacity - the initial capacitylocale - the Locale to use for case-insensitive key conversionconvertKey(String)public boolean containsKey(Object key)
containsKey 在接口中 Map<String,V>public boolean containsValue(Object value)
containsValue 在接口中 Map<String,V>@Nullable public V getOrDefault(Object key, V defaultValue)
getOrDefault 在接口中 Map<String,V>@Nullable public V putIfAbsent(String key, @Nullable V value)
putIfAbsent 在接口中 Map<String,V>@Nullable public V supplyIfAbsent(String key, @NonNull Supplier<? super String,? extends V> supplier)
public LinkedCaseInsensitiveMap<V> clone()
public Locale getLocale()
LinkedCaseInsensitiveMap.
Used for case-insensitive key conversion.protected String convertKey(String key)
The default implementation converts the key to lower-case according to this Map's Locale.
key - the user-specified keyString.toLowerCase(Locale)Copyright © 2019. All rights reserved.