Class KeywordVariables
java.lang.Object
org.apache.commons.jxpath.servlet.KeywordVariables
- All Implemented Interfaces:
Serializable
,Variables
Implementation of the Variables interface that provides access
to a single object using a reserved name (keyword).
- Version:
- $Revision: 652925 $ $Date: 2008-05-02 17:05:41 -0500 (Fri, 02 May 2008) $
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKeywordVariables
(String keyword, Object object) Create a new KeywordVariables. -
Method Summary
Modifier and TypeMethodDescriptionvoid
declareVariable
(String variable, Object value) Defines a new variable with the specified value or modifies the value of an existing variable.getVariable
(String variable) Returns the value of the specified variable.boolean
isDeclaredVariable
(String variable) Returns true if the specified variable is declared.void
undeclareVariable
(String variable) Removes an existing variable.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
keyword
-
object
-
-
Constructor Details
-
KeywordVariables
Create a new KeywordVariables.- Parameters:
keyword
- Stringobject
- value
-
-
Method Details
-
isDeclaredVariable
Description copied from interface:Variables
Returns true if the specified variable is declared.- Specified by:
isDeclaredVariable
in interfaceVariables
- Parameters:
variable
- variable name- Returns:
- boolean
-
getVariable
Description copied from interface:Variables
Returns the value of the specified variable.- Specified by:
getVariable
in interfaceVariables
- Parameters:
variable
- variable name- Returns:
- Object value
-
declareVariable
Description copied from interface:Variables
Defines a new variable with the specified value or modifies the value of an existing variable. May throw UnsupportedOperationException.- Specified by:
declareVariable
in interfaceVariables
- Parameters:
variable
- variable namevalue
- to declare
-
undeclareVariable
Description copied from interface:Variables
Removes an existing variable. May throw UnsupportedOperationException.- Specified by:
undeclareVariable
in interfaceVariables
- Parameters:
variable
- is a variable name without the "$" sign
-