|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.query.sql.util.VariableContext
public class VariableContext
Constructor Summary | |
---|---|
VariableContext()
Constructor for VariableContext. |
|
VariableContext(boolean delegateSets)
|
Method Summary | |
---|---|
boolean |
containsVariable(ElementSymbol variable)
Check if this context or any of it's parent contexts contain this variable |
void |
getFlattenedContextMap(java.util.Map values)
Helper Methods |
java.lang.Object |
getGlobalValue(java.lang.String variable)
|
VariableContext |
getParentContext()
Get the parent context for this variable context. |
java.lang.Object |
getValue(ElementSymbol variable)
Get the value for the given variable, if the variable exits in the current context just return the value of the variable else lookup the parent context and return the value of the variable. |
boolean |
isEmpty()
Check if the current context and its parents contain any variables |
java.lang.Object |
remove(ElementSymbol symbol)
|
void |
setGlobalValue(java.lang.String variable,
java.lang.Object value)
|
void |
setParentContext(VariableContext parent)
Set the parent variable context for this variable context, when looking up the variable's value, if the variable is not present in the current context, the parent context is lookedup. |
void |
setValue(ElementSymbol variable,
java.lang.Object value)
Set the value for the given, if the variable already exits replaces its value with the given value else adds a new variable to the map. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VariableContext()
public VariableContext(boolean delegateSets)
Method Detail |
---|
public void setGlobalValue(java.lang.String variable, java.lang.Object value)
public java.lang.Object getGlobalValue(java.lang.String variable) throws MetaMatrixComponentException
MetaMatrixComponentException
public void setValue(ElementSymbol variable, java.lang.Object value)
variable
- The ElementSymbol
to be added as a variable.value
- The value to be set for the given variable.public java.lang.Object getValue(ElementSymbol variable)
variable
- The ElementSymbol
whose value needs to be returned.
public void setParentContext(VariableContext parent)
parent
- The parent VariableContext
.public VariableContext getParentContext()
VariableContext
.public void getFlattenedContextMap(java.util.Map values)
public boolean containsVariable(ElementSymbol variable)
variable
- The variable which may be present on this context
public boolean isEmpty()
public java.lang.Object remove(ElementSymbol symbol)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |