|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.commons.jxpath.BasicVariables
A basic implementation of the Variables interface that uses a HashMap.
| Constructor Summary | |
BasicVariables()
|
|
| Method Summary | |
void |
declareVariable(java.lang.String varName,
java.lang.Object value)
Defines a new variable with the specified value or modifies the value of an existing variable. |
java.lang.Object |
getVariable(java.lang.String varName)
Returns the value of the variable if it is defined, otherwise, throws IllegalArgumentException |
boolean |
isDeclaredVariable(java.lang.String varName)
Returns true if the variable has been defined, even if the value of the variable is null. |
java.lang.String |
toString()
|
void |
undeclareVariable(java.lang.String varName)
Removes an existing variable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BasicVariables()
| Method Detail |
public boolean isDeclaredVariable(java.lang.String varName)
isDeclaredVariable in interface VariablesvarName - is a variable name without the "$" sign
public java.lang.Object getVariable(java.lang.String varName)
getVariable in interface VariablesvarName - is a variable name without the "$" sign
public void declareVariable(java.lang.String varName,
java.lang.Object value)
declareVariable in interface VariablesvarName - is a variable name without the "$" signvalue - is the new value for the variable, which can be nullpublic void undeclareVariable(java.lang.String varName)
undeclareVariable in interface VariablesvarName - is a variable name without the "$" signpublic 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 | |||||||||