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

## org.apache.commons.jxpath.servlet
Class KeywordVariables

    java.lang.Object
      org.apache.commons.jxpath.servlet.KeywordVariables

All Implemented Interfaces:
  Serializable, Variables

    public class KeywordVariables

extends 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) $
Author:
  Dmitri Plotnikov
See Also:
  Serialized Form

Constructor Summary
`KeywordVariables(String keyword, Object object)` Create a new KeywordVariables.

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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KeywordVariables

    public KeywordVariables(String keyword,
                            Object object)

  Create a new KeywordVariables.

  Parameters:
    `keyword` - String
    `object` - value

Method Detail

### isDeclaredVariable

    public boolean isDeclaredVariable(String variable)

  Description copied from interface: `Variables`
  Returns true if the specified variable is declared.

  Specified by:
    `isDeclaredVariable` in interface `Variables`
  Parameters:
    `variable` - variable name
  Returns:
    boolean

### getVariable

    public Object getVariable(String variable)

  Description copied from interface: `Variables`
  Returns the value of the specified variable.

  Specified by:
    `getVariable` in interface `Variables`
  Parameters:
    `variable` - variable name
  Returns:
    Object value

### declareVariable

    public void declareVariable(String variable,
                                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`
  Parameters:
    `variable` - variable name
    `value` - to declare

### undeclareVariable

    public void undeclareVariable(String variable)

  Description copied from interface: `Variables`
  Removes an existing variable. May throw UnsupportedOperationException.

  Specified by:
    `undeclareVariable` in interface `Variables`
  Parameters:
    `variable` - is a variable name without the "$" sign

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

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.