|
|||||||||
| Home >> All >> org >> apache >> commons >> [ jxpath overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.commons.jxpath
Class BasicVariables

java.lang.Objectorg.apache.commons.jxpath.BasicVariables
- All Implemented Interfaces:
- Variables
- public class BasicVariables
- extends java.lang.Object
- implements Variables
- extends java.lang.Object
A basic implementation of the Variables interface that uses a HashMap.
- Version:
- $Revision: 1.7 $ $Date: 2004/02/29 14:17:42 $
| 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()
Convert this Object to a human-readable String. |
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 |
vars
private java.util.HashMap vars
- Contains the values of declared variables
| Constructor Detail |
BasicVariables
public BasicVariables()
| Method Detail |
isDeclaredVariable
public boolean isDeclaredVariable(java.lang.String varName)
- Returns true if the variable has been defined, even if the
value of the variable is null.
- Specified by:
isDeclaredVariablein interfaceVariables
getVariable
public java.lang.Object getVariable(java.lang.String varName)
- Returns the value of the variable if it is defined,
otherwise, throws IllegalArgumentException
- Specified by:
getVariablein interfaceVariables
declareVariable
public 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.
- Specified by:
declareVariablein interfaceVariables
undeclareVariable
public void undeclareVariable(java.lang.String varName)
- Removes an existing variable. May throw UnsupportedOperationException.
- Specified by:
undeclareVariablein interfaceVariables
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> org >> apache >> commons >> [ jxpath overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.commons.jxpath.BasicVariables