Package team.unnamed.mocha.util
Class CaseInsensitiveStringHashMap<V>
- Type Parameters:
V- The value type
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,V>
A
HashMap implementation that uses case-insensitive
Strings as keys. In this kind of map, all keys are
lower-cased before they are added.
Listing keys will return all the keys in lowercase.
- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionCaseInsensitiveStringHashMap(int initialCapacity) CaseInsensitiveStringHashMap(int initialCapacity, float loadFactor) CaseInsensitiveStringHashMap(Map<String, ? extends V> m) -
Method Summary
Modifier and TypeMethodDescriptioncomputeIfAbsent(String key, @NotNull Function<? super String, ? extends V> mappingFunction) computeIfPresent(String key, @NotNull BiFunction<? super String, ? super V, ? extends V> remappingFunction) booleancontainsKey(Object key) entrySet()getOrDefault(Object key, V defaultValue) keySet()voidputIfAbsent(String key, V value) booleanbooleanMethods inherited from class java.util.HashMap
clear, clone, containsValue, forEach, isEmpty, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
CaseInsensitiveStringHashMap
public CaseInsensitiveStringHashMap(int initialCapacity, float loadFactor) -
CaseInsensitiveStringHashMap
public CaseInsensitiveStringHashMap(int initialCapacity) -
CaseInsensitiveStringHashMap
public CaseInsensitiveStringHashMap() -
CaseInsensitiveStringHashMap
-
-
Method Details
-
get
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,V> - Overrides:
containsKeyin classHashMap<String,V>
-
put
-
putAll
-
remove
-
keySet
-
entrySet
-
getOrDefault
- Specified by:
getOrDefaultin interfaceMap<String,V> - Overrides:
getOrDefaultin classHashMap<String,V>
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceMap<String,V> - Overrides:
putIfAbsentin classHashMap<String,V>
-
remove
-
replace
-
replace
-
computeIfAbsent
public V computeIfAbsent(String key, @NotNull @NotNull Function<? super String, ? extends V> mappingFunction) - Specified by:
computeIfAbsentin interfaceMap<String,V> - Overrides:
computeIfAbsentin classHashMap<String,V>
-
computeIfPresent
public V computeIfPresent(String key, @NotNull @NotNull BiFunction<? super String, ? super V, ? extends V> remappingFunction) - Specified by:
computeIfPresentin interfaceMap<String,V> - Overrides:
computeIfPresentin classHashMap<String,V>
-
compute
-
merge
-