org.apache.commons.jxpath.servlet

Class KeywordVariables

Implemented Interfaces:
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: 1.6 $ $Date: 2004/02/29 14:17:40 $
Author:
Dmitri Plotnikov

Constructor Summary

KeywordVariables(String keyword, Object object)

Method Summary

void
declareVariable(String variable, Object value)
Defines a new variable with the specified value or modifies the value of an existing variable.
Object
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.

Constructor Details

KeywordVariables

public KeywordVariables(String keyword,
                        Object object)

Method Details

declareVariable

public void declareVariable(String variable,
                            Object value)
Defines a new variable with the specified value or modifies the value of an existing variable. May throw UnsupportedOperationException.
Specified by:
declareVariable in interface Variables

getVariable

public Object getVariable(String variable)
Returns the value of the specified variable. Throws IllegalArgumentException if there is no such variable.
Specified by:
getVariable in interface Variables

isDeclaredVariable

public boolean isDeclaredVariable(String variable)
Returns true if the specified variable is declared.
Specified by:
isDeclaredVariable in interface Variables

undeclareVariable

public void undeclareVariable(String variable)
Removes an existing variable. May throw UnsupportedOperationException.
Specified by:
undeclareVariable in interface Variables
Parameters: