org.gnu.xml.ezparse
Class DefaultContext

java.lang.Object
  extended byorg.gnu.xml.ezparse.DefaultContext
All Implemented Interfaces:
Context

public class DefaultContext
extends java.lang.Object
implements Context

Generic context which is available to ElementListeners during call-backs.

Since:
J2SDK 1.4

Constructor Summary
DefaultContext()
          Constructor.
 
Method Summary
 void clear()
          Clears the internal store of this context.
 java.lang.Object get(java.lang.String key)
          Retrieves a value based on the key.
 void set(java.lang.String key, java.lang.Object value)
          Sets a name value pair based on method parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContext

public DefaultContext()
Constructor. Initializes the internal store.

Method Detail

set

public void set(java.lang.String key,
                java.lang.Object value)
Sets a name value pair based on method parameters.

Specified by:
set in interface Context
Parameters:
key - must not be null -- can be empty
value - value tied to the key

get

public java.lang.Object get(java.lang.String key)
Retrieves a value based on the key. Note that the returned value may be null if no value is mapped to key.

Specified by:
get in interface Context
Parameters:
key -
Returns:
value

clear

public void clear()
Clears the internal store of this context.

Specified by:
clear in interface Context