public class LinkedCaseInsensitiveMap<V> extends LinkedHashMap<String,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
LinkedCaseInsensitiveMap()
Create a new LinkedCaseInsensitiveMap for the default Locale.
|
LinkedCaseInsensitiveMap(int initialCapacity)
Create a new LinkedCaseInsensitiveMap that wraps a
LinkedHashMap
with the given initial capacity and stores lower-case keys according
to the default Locale. |
LinkedCaseInsensitiveMap(int initialCapacity,
Locale locale)
Create a new LinkedCaseInsensitiveMap that wraps a
LinkedHashMap
with the given initial capacity and stores lower-case keys according
to the given Locale. |
LinkedCaseInsensitiveMap(Locale locale)
Create a new LinkedCaseInsensitiveMap that stores lower-case keys
according to the given Locale.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
protected String |
convertKey(String key)
Convert the given key to a case-insensitive key.
|
V |
get(Object key) |
V |
put(String key,
V value) |
void |
putAll(Map<? extends String,? extends V> map) |
V |
remove(Object key) |
containsValue, removeEldestEntryequals, hashCode, toStringpublic LinkedCaseInsensitiveMap()
String.toLowerCase()public LinkedCaseInsensitiveMap(Locale locale)
locale - the Locale to use for lower-case conversionString.toLowerCase(java.util.Locale)public LinkedCaseInsensitiveMap(int initialCapacity)
LinkedHashMap
with the given initial capacity and stores lower-case keys according
to the default Locale.initialCapacity - the initial capacityString.toLowerCase()public LinkedCaseInsensitiveMap(int initialCapacity,
Locale locale)
LinkedHashMap
with the given initial capacity and stores lower-case keys according
to the given Locale.initialCapacity - the initial capacitylocale - the Locale to use for lower-case conversionString.toLowerCase(java.util.Locale)public boolean containsKey(Object key)
containsKey in interface Map<String,V>containsKey in class HashMap<String,V>public void clear()
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(java.util.Locale)Copyright © 2012–2014. All rights reserved.