org.apache.commons.jxpath.servlet
Class KeywordVariables

java.lang.Object
  |
  +--org.apache.commons.jxpath.servlet.KeywordVariables
All 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.4 $ $Date: 2003/01/11 05:41:26 $
Author:
Dmitri Plotnikov

Constructor Summary
KeywordVariables(java.lang.String keyword, java.lang.Object object)
           
 
Method Summary
 void declareVariable(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.Object getVariable(java.lang.String variable)
          Returns the value of the specified variable.
 boolean isDeclaredVariable(java.lang.String variable)
          Returns true if the specified variable is declared.
 void undeclareVariable(java.lang.String variable)
          Removes an existing variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeywordVariables

public KeywordVariables(java.lang.String keyword,
                        java.lang.Object object)
Method Detail

isDeclaredVariable

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

getVariable

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

declareVariable

public void declareVariable(java.lang.String variable,
                            java.lang.Object value)
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 interface Variables

undeclareVariable

public void undeclareVariable(java.lang.String variable)
Description copied from interface: Variables
Removes an existing variable. May throw UnsupportedOperationException.
Specified by:
undeclareVariable in interface Variables
Following copied from interface: org.apache.commons.jxpath.Variables
Parameters:
varName - is a variable name without the "$" sign


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.