public class CaseBlindHashMap extends HashMap
Strings as
key values.
Internally, keys are case insensitive: ABC = abc.
Two methods have been added to facilitate working with Sets of key strings.
See stringKeySet() and stringKeyIterator().
| Modifier and Type | Class and Description |
|---|---|
static class |
CaseBlindHashMap.CaseBlindString
A crude, case insensitive string - used internally to represent
key values.
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
CaseBlindHashMap()
Constructors
|
CaseBlindHashMap(CaseBlindHashMap map) |
CaseBlindHashMap(int initCap) |
CaseBlindHashMap(int initCap,
float loadFactor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(String key)
Does the map contain this key?
|
Object |
get(String key)
Fetch a value by name - null keys are not supported
|
void |
put(String key,
Object value)
Add the key/value pair to the map - null values are not supported
|
void |
remove(String key)
Remove a key/value pair from this map
|
Iterator |
stringKeyIterator()
Get an Iterator to the String based key set
|
Set |
stringKeySet()
Get the set of keys contained in this map.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringpublic CaseBlindHashMap()
public CaseBlindHashMap(CaseBlindHashMap map)
public CaseBlindHashMap(int initCap)
public CaseBlindHashMap(int initCap,
float loadFactor)
public Set stringKeySet()
Strings (not the CaseBlindStrings used
internally).
This is accopmlished by making a copy of the original map - modifications made to this copy are not reflected in the original.
public Iterator stringKeyIterator()
public boolean containsKey(String key)
key - The key to look uppublic Object get(String key)
key - The key to look uppublic void put(String key, Object value)
key - The key namevalue - The object to storepublic void remove(String key)
key - Non-null key to removeCopyright © 2003–2020 Sakai Project. All rights reserved.