Class SingleVariableContext
- java.lang.Object
-
- org.camunda.bpm.engine.variable.impl.context.SingleVariableContext
-
- All Implemented Interfaces:
VariableContext
public class SingleVariableContext extends Object implements VariableContext
AnVariableContextallowing to resolve a single variable only.- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringnameprotected TypedValuetypedValue
-
Constructor Summary
Constructors Constructor Description SingleVariableContext(String name, TypedValue typedValue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsVariable(String name)Checks whether a variable with the given name is resolve through this context.Set<String>keySet()TypedValueresolve(String variableName)Resolve a value in this context.static SingleVariableContextsingleVariable(String name, TypedValue value)
-
-
-
Field Detail
-
typedValue
protected final TypedValue typedValue
-
name
protected String name
-
-
Constructor Detail
-
SingleVariableContext
public SingleVariableContext(String name, TypedValue typedValue)
-
-
Method Detail
-
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 name)
Description copied from interface:VariableContextChecks whether a variable with the given name is resolve through this context.- Specified by:
containsVariablein interfaceVariableContext- Parameters:
name- the name of the variable to check- Returns:
- true if the variable is resolve.
-
keySet
public Set<String> keySet()
- Specified by:
keySetin interfaceVariableContext- Returns:
- a set of all variable names resolvable through this Context.
-
singleVariable
public static SingleVariableContext singleVariable(String name, TypedValue value)
-
-