Class IdentifierMap<V>
- Type Parameters:
V- value type
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,V>
This class behaves like a HashMap with lower-case String keys. All key
arguments are lower-cased before further processing.
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeIfAbsent(String key, Function<? super String, ? extends V> mappingFunction) computeIfPresent(String key, BiFunction<? super String, ? super V, ? extends V> remappingFunction) booleancontainsKey(Object key) getOrDefault(Object key, V defaultValue) static <T> IdentifierMap<T>index(Collection<? extends T> items, Function<T, String> nameGetter) voidputIfAbsent(String key, V value) booleanbooleanvoidreplaceAll(BiFunction<? super String, ? super V, ? extends V> function) Methods inherited from class java.util.HashMap
clear, clone, containsValue, entrySet, forEach, isEmpty, keySet, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
IdentifierMap
public IdentifierMap() -
IdentifierMap
public IdentifierMap(int expectedSize) -
IdentifierMap
-
-
Method Details
-
replaceAll
- Specified by:
replaceAllin interfaceMap<String,V> - Overrides:
replaceAllin classHashMap<String,V>
-
get
-
getOrDefault
- Specified by:
getOrDefaultin interfaceMap<String,V> - Overrides:
getOrDefaultin classHashMap<String,V>
-
putAll
-
put
-
remove
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceMap<String,V> - Overrides:
putIfAbsentin classHashMap<String,V>
-
remove
-
replace
-
replace
-
computeIfAbsent
- Specified by:
computeIfAbsentin interfaceMap<String,V> - Overrides:
computeIfAbsentin classHashMap<String,V>
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,V> - Overrides:
containsKeyin classHashMap<String,V>
-
computeIfPresent
public V computeIfPresent(String key, BiFunction<? super String, ? super V, ? extends V> remappingFunction) - Specified by:
computeIfPresentin interfaceMap<String,V> - Overrides:
computeIfPresentin classHashMap<String,V>
-
compute
-
merge
-
index
public static <T> IdentifierMap<T> index(Collection<? extends T> items, Function<T, String> nameGetter)
-