| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.scxml.env.SimpleContext
public class SimpleContext
Simple Context wrapping a map of variables.
| Constructor Summary | |
|---|---|
SimpleContext()
Constructor.  | 
|
SimpleContext(Context parent)
Constructor.  | 
|
SimpleContext(Context parent,
              Map initialVars)
Constructor.  | 
|
SimpleContext(Map initialVars)
Constructor.  | 
|
| Method Summary | |
|---|---|
 Object | 
get(String name)
Get the value of this variable; delegating to parent.  | 
protected  org.apache.commons.logging.Log | 
getLog()
Get the log used by this Context instance. | 
 Context | 
getParent()
Get the parent Context, may be null.  | 
 Map | 
getVars()
Get the Map of all local 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.  | 
protected  void | 
setLog(org.apache.commons.logging.Log log)
Set the log used by this Context instance. | 
protected  void | 
setVars(Map vars)
Set the variables map.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public SimpleContext()
public SimpleContext(Context parent)
parent - A parent Context, can be nullpublic SimpleContext(Map initialVars)
initialVars - A pre-populated initial variables map
public SimpleContext(Context parent,
                     Map initialVars)
parent - A parent Context, can be nullinitialVars - A pre-populated initial variables map| Method Detail | 
|---|
public void set(String name,
                Object value)
set in interface Contextname - The variable namevalue - The variable valueContext.set(String, Object)public Object get(String name)
get in interface Contextname - The variable name
Context.get(java.lang.String)public boolean has(String name)
has in interface Contextname - The variable name
Context.has(java.lang.String)public void reset()
reset in interface ContextContext.reset()public Context getParent()
getParent in interface ContextContext.getParent()
public void setLocal(String name,
                     Object value)
setLocal in interface Contextname - The variable namevalue - The variable valueContext.setLocal(String, Object)protected void setVars(Map vars)
vars - The new Map of variables.public Map getVars()
getVars in interface ContextContext.getParent()protected void setLog(org.apache.commons.logging.Log log)
Context instance.
log - The new log.protected org.apache.commons.logging.Log getLog()
Context instance.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||