com.plotnix.jex
Interface Variables


public interface Variables

Variables provide access to a global set of values accessible via expressions. To use a custom implementation of this interface, pass it to the Context.setVariables() method

Note that a variable may be defined with a null value

Version:
$Revision$
Author:
Dmitri Plotnikov

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 specified variable.
 boolean isDeclaredVariable(java.lang.String varName)
          Returns true if the specified variable is declared.
 

Method Detail

isDeclaredVariable

public boolean isDeclaredVariable(java.lang.String varName)
Returns true if the specified variable is declared.
Parameters:
varName - a variable name
Returns:
true if the variable exists

getVariable

public java.lang.Object getVariable(java.lang.String varName)
Returns the value of the specified variable. Throws IllegalArgumentException if there is no such variable.
Parameters:
varName - a variable name
Returns:
the value of the variable

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. May throw UnsupportedOperationException.
Parameters:
varName - a variable name
value - the new value of the variable, which can be null


Copyright (c) 2002 - Plotnix, Inc