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()
VariableContext
asVariableContext()
Interprets the variable map as variable contextvoid
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
boolean
containsVariable(String variableName)
Checks whether a variable with the given name is resolve through this context.Set<Map.Entry<String,Object>>
entrySet()
boolean
equals(Object obj)
Object
get(Object key)
<T> T
getValue(String name, Class<T> type)
<T extends TypedValue>
TgetValueTyped(String name)
int
hashCode()
boolean
isEmpty()
Set<String>
keySet()
Object
put(String key, Object value)
void
putAll(Map<? extends String,? extends Object> m)
VariableMap
putValue(String name, Object value)
VariableMap
putValueTyped(String name, TypedValue value)
Object
remove(Object key)
TypedValue
resolve(String variableName)
Resolve a value in this context.int
size()
String
toString()
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:
putValue
in interfaceVariableMap
-
putValueTyped
public VariableMap putValueTyped(String name, TypedValue value)
- Specified by:
putValueTyped
in interfaceVariableMap
-
getValue
public <T> T getValue(String name, Class<T> type)
- Specified by:
getValue
in interfaceVariableMap
-
getValueTyped
public <T extends TypedValue> T getValueTyped(String name)
- Specified by:
getValueTyped
in interfaceVariableMap
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<String,Object>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<String,Object>
-
equals
public boolean equals(Object obj)
-
hashCode
public int hashCode()
-
resolve
public TypedValue resolve(String variableName)
Description copied from interface:VariableContext
Resolve a value in this context.- Specified by:
resolve
in 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:VariableContext
Checks whether a variable with the given name is resolve through this context.- Specified by:
containsVariable
in 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:VariableMap
Interprets the variable map as variable context- Specified by:
asVariableContext
in interfaceVariableMap
- Returns:
- A VariableContext which is capable of resolving all variables in the map
-
-