Class KeywordVariables
- java.lang.Object
-
- org.apache.commons.jxpath.servlet.KeywordVariables
-
- All Implemented Interfaces:
java.io.Serializable,Variables
public class KeywordVariables extends java.lang.Object implements 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringkeywordprivate java.lang.Objectobjectprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description KeywordVariables(java.lang.String keyword, java.lang.Object object)Create a new KeywordVariables.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeclareVariable(java.lang.String variable, java.lang.Object value)Defines a new variable with the specified value or modifies the value of an existing variable.java.lang.ObjectgetVariable(java.lang.String variable)Returns the value of the specified variable.booleanisDeclaredVariable(java.lang.String variable)Returns true if the specified variable is declared.voidundeclareVariable(java.lang.String variable)Removes an existing variable.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
keyword
private java.lang.String keyword
-
object
private java.lang.Object object
-
-
Method Detail
-
isDeclaredVariable
public boolean isDeclaredVariable(java.lang.String variable)
Description copied from interface:VariablesReturns true if the specified variable is declared.- Specified by:
isDeclaredVariablein interfaceVariables- Parameters:
variable- variable name- Returns:
- boolean
-
getVariable
public java.lang.Object getVariable(java.lang.String variable)
Description copied from interface:VariablesReturns the value of the specified variable.- Specified by:
getVariablein interfaceVariables- Parameters:
variable- variable name- Returns:
- Object value
-
declareVariable
public void declareVariable(java.lang.String variable, java.lang.Object value)Description copied from interface:VariablesDefines a new variable with the specified value or modifies the value of an existing variable. May throw UnsupportedOperationException.- Specified by:
declareVariablein interfaceVariables- Parameters:
variable- variable namevalue- to declare
-
undeclareVariable
public void undeclareVariable(java.lang.String variable)
Description copied from interface:VariablesRemoves an existing variable. May throw UnsupportedOperationException.- Specified by:
undeclareVariablein interfaceVariables- Parameters:
variable- is a variable name without the "$" sign
-
-