|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jxpath.BasicVariables
public class BasicVariables
A basic implementation of the Variables interface that uses a HashMap.
Constructor Summary | |
---|---|
BasicVariables()
|
Method Summary | |
---|---|
void |
declareVariable(String varName,
Object value)
Defines a new variable with the specified value or modifies the value of an existing variable. |
Object |
getVariable(String varName)
Returns the value of the variable if it is defined, otherwise, throws IllegalArgumentException |
boolean |
isDeclaredVariable(String varName)
Returns true if the variable has been defined, even if the value of the variable is null. |
String |
toString()
|
void |
undeclareVariable(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(String varName)
isDeclaredVariable
in interface Variables
varName
- is a variable name without the "$" sign
public Object getVariable(String varName)
getVariable
in interface Variables
varName
- is a variable name without the "$" sign
public void declareVariable(String varName, 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(String varName)
undeclareVariable
in interface Variables
varName
- is a variable name without the "$" signpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |