|
|||||||||||
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.
Field Summary | |
private java.util.HashMap |
vars
Contains the values of declared variables |
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 |
Field Detail |
private java.util.HashMap vars
Constructor Detail |
public BasicVariables()
Method Detail |
public boolean isDeclaredVariable(java.lang.String varName)
isDeclaredVariable
in interface Variables
varName
- is a variable name without the "$" sign
public java.lang.Object getVariable(java.lang.String varName)
getVariable
in interface Variables
varName
- is a variable name without the "$" sign
public void declareVariable(java.lang.String varName, java.lang.Object value)
declareVariable
in interface Variables
varName
- 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 Variables
varName
- is a variable name without the "$" signpublic java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |