| org.apache.commons.scxml.Context
All known Subclasses: org.apache.commons.scxml.env.SimpleContext,
Context | public interface Context (Code) | | A Context or "scope" for storing variables; usually tied to
a SCXML root or State object.
|
Method Summary | |
Object | get(String name) Get the value of this variable; delegating to parent. | Context | getParent() Get the parent Context, may be null. | Map | getVars() Get the Map of all variables in this Context. | boolean | has(String name) Check if this variable exists, delegating to parent. | void | reset() Clear this Context. | void | set(String name, Object value) Assigns a new value to an existing variable or creates a new one. | void | setLocal(String name, Object value) Assigns a new value to an existing variable or creates a new one. |
get | Object get(String name)(Code) | | Get the value of this variable; delegating to parent.
Parameters: name - The name of the variable The value (or null) |
getParent | Context getParent()(Code) | | Get the parent Context, may be null.
The parent Context in a chained Context environment |
getVars | Map getVars()(Code) | | Get the Map of all variables in this Context.
Local variable entries MapTo get variables in parent Context, call getParent().getVars(). See Also: Context.getParent() |
has | boolean has(String name)(Code) | | Check if this variable exists, delegating to parent.
Parameters: name - The name of the variable Whether a variable with the name exists in this Context |
reset | void reset()(Code) | | Clear this Context.
|
set | void set(String name, Object value)(Code) | | Assigns a new value to an existing variable or creates a new one.
The method searches the chain of parent Contexts for variable
existence.
Parameters: name - The variable name Parameters: value - The variable value |
setLocal | void setLocal(String name, Object value)(Code) | | Assigns a new value to an existing variable or creates a new one.
The method allows to shaddow a variable of the same name up the
Context chain.
Parameters: name - The variable name Parameters: value - The variable value |
|
|