Class VariableMapImpl
- java.lang.Object
-
- org.camunda.bpm.engine.variable.impl.VariableMapImpl
-
- All Implemented Interfaces:
Serializable,Map<String,Object>,VariableContext,VariableMap
public class VariableMapImpl extends Object implements VariableMap, Serializable, VariableContext
- Author:
- Daniel Meyer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,TypedValue>variables
-
Constructor Summary
Constructors Constructor Description VariableMapImpl()VariableMapImpl(Map<String,Object> map)VariableMapImpl(VariableMapImpl map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>asValueMap()VariableContextasVariableContext()Interprets the variable map as variable contextvoidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)booleancontainsVariable(String variableName)Checks whether a variable with the given name is resolve through this context.Set<Map.Entry<String,Object>>entrySet()booleanequals(Object obj)Objectget(Object key)<T> TgetValue(String name, Class<T> type)<T extends TypedValue>
TgetValueTyped(String name)inthashCode()booleanisEmpty()Set<String>keySet()Objectput(String key, Object value)voidputAll(Map<? extends String,? extends Object> m)VariableMapputValue(String name, Object value)VariableMapputValueTyped(String name, TypedValue value)Objectremove(Object key)TypedValueresolve(String variableName)Resolve a value in this context.intsize()StringtoString()Collection<Object>values()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
variables
protected Map<String,TypedValue> variables
-
-
Constructor Detail
-
VariableMapImpl
public VariableMapImpl(VariableMapImpl map)
-
VariableMapImpl
public VariableMapImpl()
-
-
Method Detail
-
putValue
public VariableMap putValue(String name, Object value)
- Specified by:
putValuein interfaceVariableMap
-
putValueTyped
public VariableMap putValueTyped(String name, TypedValue value)
- Specified by:
putValueTypedin interfaceVariableMap
-
getValue
public <T> T getValue(String name, Class<T> type)
- Specified by:
getValuein interfaceVariableMap
-
getValueTyped
public <T extends TypedValue> T getValueTyped(String name)
- Specified by:
getValueTypedin interfaceVariableMap
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<String,Object>
-
equals
public boolean equals(Object obj)
-
hashCode
public int hashCode()
-
resolve
public TypedValue resolve(String variableName)
Description copied from interface:VariableContextResolve a value in this context.- Specified by:
resolvein interfaceVariableContext- Parameters:
variableName- the name of the variable to resolve.- Returns:
- the value of the variable or null in case the variable does not exist.
-
containsVariable
public boolean containsVariable(String variableName)
Description copied from interface:VariableContextChecks whether a variable with the given name is resolve through this context.- Specified by:
containsVariablein interfaceVariableContext- Parameters:
variableName- the name of the variable to check- Returns:
- true if the variable is resolve.
-
asVariableContext
public VariableContext asVariableContext()
Description copied from interface:VariableMapInterprets the variable map as variable context- Specified by:
asVariableContextin interfaceVariableMap- Returns:
- A VariableContext which is capable of resolving all variables in the map
-
-