Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.jxpath
Interface Variables

All Known Implementing Classes:
  BasicVariables, KeywordVariables

public interface Variables

Variables provide access to a global set of values accessible via XPath. XPath can reference variables using the `"$varname"` syntax. To use a custom implementation of this interface, pass it to `JXPathContext.setVariables()`

Version:
  $Revision: 1.4 $ $Date: 2003/03/11 00:59:12 $
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.
`void` | `undeclareVariable(java.lang.String varName)` Removes an existing variable.

Method Detail

### isDeclaredVariable

    public boolean isDeclaredVariable(java.lang.String varName)

  Returns true if the specified variable is declared.

### 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.

### 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.

### undeclareVariable

    public void undeclareVariable(java.lang.String varName)

  Removes an existing variable. May throw UnsupportedOperationException.
  Parameters:
    `varName` - is a variable name without the "$" sign

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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