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) boolean
containsKey
(Object key) getOrDefault
(Object key, V defaultValue) static <T> IdentifierMap<T>
index
(Collection<? extends T> items, Function<T, String> nameGetter) void
putIfAbsent
(String key, V value) boolean
boolean
void
replaceAll
(BiFunction<? super String, ? super V, ? extends V> function) Methods inherited from class java.util.HashMap
clear, clone, containsValue, entrySet, forEach, isEmpty, keySet, size, values
Methods 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:
replaceAll
in interfaceMap<String,
V> - Overrides:
replaceAll
in classHashMap<String,
V>
-
get
-
getOrDefault
- Specified by:
getOrDefault
in interfaceMap<String,
V> - Overrides:
getOrDefault
in classHashMap<String,
V>
-
putAll
-
put
-
remove
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<String,
V> - Overrides:
putIfAbsent
in classHashMap<String,
V>
-
remove
-
replace
-
replace
-
computeIfAbsent
- Specified by:
computeIfAbsent
in interfaceMap<String,
V> - Overrides:
computeIfAbsent
in classHashMap<String,
V>
-
containsKey
- Specified by:
containsKey
in interfaceMap<String,
V> - Overrides:
containsKey
in classHashMap<String,
V>
-
computeIfPresent
public V computeIfPresent(String key, BiFunction<? super String, ? super V, ? extends V> remappingFunction) - Specified by:
computeIfPresent
in interfaceMap<String,
V> - Overrides:
computeIfPresent
in classHashMap<String,
V>
-
compute
-
merge
-
index
public static <T> IdentifierMap<T> index(Collection<? extends T> items, Function<T, String> nameGetter)
-