Package org.antublue.test.engine.api
Class ParameterMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,Object>
-
- org.antublue.test.engine.api.ParameterMap
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Object>
public class ParameterMap extends LinkedHashMap<String,Object>
Class to implement a ParameterMap- 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 ParameterMap()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(Object key)Method to return whether a key exists in the map<T> Tget(String key)Method to get value from the map<T> Tget(String key, Class<T> clazz)Method to get a value from the map cast to a specific typeObjectmerge(String key, Object value, BiFunction<Object,Object,Object> remappingFunction)Method to merge a map into this map (Unsupported)ParameterMapput(String key, Object object)Method to put a key / value into the mapvoidputAll(Map map)Method to merge a map into this mapObjectputIfAbsent(String key, Object object)Method to add a key / value if it doesn't exist in this map-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, remove, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Method Detail
-
containsKey
public boolean containsKey(Object key)
Method to return whether a key exists in the map- Specified by:
containsKeyin interfaceMap<String,Object>- Overrides:
containsKeyin classHashMap<String,Object>- Parameters:
key- key whose presence in this map is to be tested- Returns:
-
put
public ParameterMap put(String key, Object object)
Method to put a key / value into the map
-
putAll
public void putAll(Map map)
Method to merge a map into this map
-
putIfAbsent
public Object putIfAbsent(String key, Object object)
Method to add a key / value if it doesn't exist in this map- Specified by:
putIfAbsentin interfaceMap<String,Object>- Overrides:
putIfAbsentin classHashMap<String,Object>- Parameters:
key- key with which the specified value is to be associatedobject- value to be associated with the specified key- Returns:
-
merge
public Object merge(String key, Object value, BiFunction<Object,Object,Object> remappingFunction)
Method to merge a map into this map (Unsupported)- Parameters:
key-value-remappingFunction-- Returns:
-
get
public <T> T get(String key)
Method to get value from the map- Type Parameters:
T-- Parameters:
key-- Returns:
-
-