VALUE - the type of values to be stored in the mappublic class CaseInsensitiveMap<VALUE> extends Object implements Map<String,VALUE>
Map with Strings as keys, and the case of a key is ignored for operations involving
keys like put(java.lang.String, VALUE), get(java.lang.Object), etc. The keys are stored and retrieved in lower case. Use the static factory
methods to create instances of this class (e.g. newConcurrentMap()).| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,VALUE>> |
entrySet() |
boolean |
equals(Object o) |
VALUE |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
static <VALUE> CaseInsensitiveMap<VALUE> |
newConcurrentMap()
Returns a new instance of
ConcurrentMap with key case-insensitivity. |
static <VALUE> CaseInsensitiveMap<VALUE> |
newHashMap()
Returns a new instance of
HashMap with key case-insensitivity. |
static <VALUE> CaseInsensitiveMap<VALUE> |
newHashMapWithExpectedSize(int expectedSize)
Returns a new instance of
HashMap, with key case-insensitivity, of expected size. |
static <VALUE> CaseInsensitiveMap<VALUE> |
newImmutableMap(Map<? extends String,? extends VALUE> map)
Returns a new instance of
ImmutableMap with key case-insensitivity. |
VALUE |
put(String key,
VALUE value) |
void |
putAll(Map<? extends String,? extends VALUE> map) |
VALUE |
remove(Object key) |
int |
size() |
Collection<VALUE> |
values() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic static <VALUE> CaseInsensitiveMap<VALUE> newConcurrentMap()
ConcurrentMap with key case-insensitivity. See
ConcurrentMap.VALUE - type of values to be stored in the mappublic static <VALUE> CaseInsensitiveMap<VALUE> newHashMap()
VALUE - type of values to be stored in the mappublic static <VALUE> CaseInsensitiveMap<VALUE> newHashMapWithExpectedSize(int expectedSize)
VALUE - type of values to be stored in the mapexpectedSize - expected sizepublic static <VALUE> CaseInsensitiveMap<VALUE> newImmutableMap(Map<? extends String,? extends VALUE> map)
ImmutableMap with key case-insensitivity. This map is built from the given
map. See ImmutableMap.VALUE - type of values to be stored in the mapmap - map to copy frompublic boolean containsKey(Object key)
containsKey in interface Map<String,VALUE>public boolean containsValue(Object value)
containsValue in interface Map<String,VALUE>public int hashCode()
Copyright © 2021 The Apache Software Foundation. All rights reserved.