Class CaseInsensitiveMap<T>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,T>
-
- com.microsoft.semantickernel.contextvariables.CaseInsensitiveMap<T>
-
- Type Parameters:
T- the type of the value
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,T>
public class CaseInsensitiveMap<T> extends HashMap<String,T>
Ajava.util.HashMapin which the keys are case-insensitive.- See Also:
- Serialized Form
-
-
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 Constructor Description CaseInsensitiveMap()Creates a new instance of theCaseInsensitiveMapclass.CaseInsensitiveMap(Map<String,T> kvMap)Creates a new instance of theCaseInsensitiveMapclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcompute(String key, BiFunction<? super String,? super T,? extends T> remappingFunction)TcomputeIfAbsent(String key, Function<? super String,? extends T> mappingFunction)TcomputeIfPresent(String key, BiFunction<? super String,? super T,? extends T> remappingFunction)booleancontainsKey(Object key)Tget(Object key)TgetOrDefault(Object key, T defaultValue)Tmerge(String key, T value, BiFunction<? super T,? super T,? extends T> remappingFunction)Tput(String key, T value)voidputAll(Map<? extends String,? extends T> m)TputIfAbsent(String key, T value)Tremove(Object key)booleanremove(Object key, Object value)Treplace(String key, T value)booleanreplace(String key, T oldValue, T newValue)-
Methods inherited from class java.util.HashMap
clear, clone, containsValue, entrySet, forEach, isEmpty, keySet, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
CaseInsensitiveMap
public CaseInsensitiveMap(Map<String,T> kvMap)
Creates a new instance of theCaseInsensitiveMapclass.- Parameters:
kvMap- the map
-
CaseInsensitiveMap
public CaseInsensitiveMap()
Creates a new instance of theCaseInsensitiveMapclass.
-
-
Method Detail
-
computeIfAbsent
public T computeIfAbsent(String key, Function<? super String,? extends T> mappingFunction)
- Specified by:
computeIfAbsentin interfaceMap<String,T>- Overrides:
computeIfAbsentin classHashMap<String,T>
-
computeIfPresent
public T computeIfPresent(String key, BiFunction<? super String,? super T,? extends T> remappingFunction)
- Specified by:
computeIfPresentin interfaceMap<String,T>- Overrides:
computeIfPresentin classHashMap<String,T>
-
compute
public T compute(String key, BiFunction<? super String,? super T,? extends T> remappingFunction)
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<String,T>- Overrides:
containsKeyin classHashMap<String,T>
-
getOrDefault
public T getOrDefault(Object key, T defaultValue)
- Specified by:
getOrDefaultin interfaceMap<String,T>- Overrides:
getOrDefaultin classHashMap<String,T>
-
merge
public T merge(String key, T value, BiFunction<? super T,? super T,? extends T> remappingFunction)
-
putIfAbsent
public T putIfAbsent(String key, T value)
- Specified by:
putIfAbsentin interfaceMap<String,T>- Overrides:
putIfAbsentin classHashMap<String,T>
-
-