com.werken.xpath

Class DefaultVariableContext

Implemented Interfaces:
VariableContext

public class DefaultVariableContext
extends java.lang.Object
implements VariableContext

A VariableContext implementation based upon a java.util.HashMap for simple name-value mappings.

Author:
bob mcwhirter (bob @ werken.com)

Method Summary

Object
getVariableValue(String name)
Resolve a variable binding

Retrieve the currently bound value of the named variable, or null if no such binding exists.

void
setVariableValue(String name, Object value)
Set a variable finding

Set the value of a named variable.

Method Details

getVariableValue

public Object getVariableValue(String name)
Resolve a variable binding

Retrieve the currently bound value of the named variable, or null if no such binding exists.

Specified by:
getVariableValue in interface VariableContext

Parameters:
name - The name of the variable sought.

Returns:
The currently bound value of the variable, or null.

See Also:
ContextSupport.getVariableValue(String), ContextSupport.setVariableContext(VariableContext)


setVariableValue

public void setVariableValue(String name,
                             Object value)
Set a variable finding

Set the value of a named variable.

Parameters:
name - The name of the variable to bind to the value
value - The value to bind to the variable name.


Copyright B) 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.