@Experimental
public class CaseInsensitiveStringMap
extends Object
implements java.util.Map<String,String>
This is used to pass options to v2 implementations to ensure consistent case insensitivity.
Methods that return keys in this map, like entrySet() and keySet(), return
keys converted to lower case. This map doesn't allow null key.
| Constructor and Description |
|---|
CaseInsensitiveStringMap(java.util.Map<String,String> originalMap) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<String,String> |
asCaseSensitiveMap()
Returns the original case-sensitive map.
|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
static CaseInsensitiveStringMap |
empty() |
java.util.Set<java.util.Map.Entry<String,String>> |
entrySet() |
boolean |
equals(Object o) |
String |
get(Object key) |
boolean |
getBoolean(String key,
boolean defaultValue)
Returns the boolean value to which the specified key is mapped,
or defaultValue if there is no mapping for the key.
|
double |
getDouble(String key,
double defaultValue)
Returns the double value to which the specified key is mapped,
or defaultValue if there is no mapping for the key.
|
int |
getInt(String key,
int defaultValue)
Returns the integer value to which the specified key is mapped,
or defaultValue if there is no mapping for the key.
|
long |
getLong(String key,
long defaultValue)
Returns the long value to which the specified key is mapped,
or defaultValue if there is no mapping for the key.
|
int |
hashCode() |
boolean |
isEmpty() |
java.util.Set<String> |
keySet() |
String |
put(String key,
String value) |
void |
putAll(java.util.Map<? extends String,? extends String> m) |
String |
remove(Object key) |
int |
size() |
java.util.Collection<String> |
values() |
public CaseInsensitiveStringMap(java.util.Map<String,String> originalMap)
public static CaseInsensitiveStringMap empty()
public int size()
size in interface java.util.Map<String,String>public boolean isEmpty()
isEmpty in interface java.util.Map<String,String>public boolean containsKey(Object key)
containsKey in interface java.util.Map<String,String>public boolean containsValue(Object value)
containsValue in interface java.util.Map<String,String>public String get(Object key)
get in interface java.util.Map<String,String>public String put(String key,
String value)
put in interface java.util.Map<String,String>public String remove(Object key)
remove in interface java.util.Map<String,String>public void putAll(java.util.Map<? extends String,? extends String> m)
putAll in interface java.util.Map<String,String>public void clear()
clear in interface java.util.Map<String,String>public java.util.Set<String> keySet()
keySet in interface java.util.Map<String,String>public java.util.Collection<String> values()
values in interface java.util.Map<String,String>public java.util.Set<java.util.Map.Entry<String,String>> entrySet()
entrySet in interface java.util.Map<String,String>public boolean getBoolean(String key,
boolean defaultValue)
public int getInt(String key,
int defaultValue)
public long getLong(String key,
long defaultValue)
public double getDouble(String key,
double defaultValue)
public java.util.Map<String,String> asCaseSensitiveMap()
public boolean equals(Object o)
equals in interface java.util.Map<String,String>equals in class Objectpublic int hashCode()
hashCode in interface java.util.Map<String,String>hashCode in class Object