biz.hammurapi.config
Class SimpleContext

java.lang.Object
  extended by biz.hammurapi.config.SimpleContext
All Implemented Interfaces:
Context, MutableContext, TraversableContext

public class SimpleContext
extends java.lang.Object
implements MutableContext, TraversableContext

Simple map-backed context.

Author:
Pavel

Constructor Summary
SimpleContext()
           
 
Method Summary
 java.lang.Object get(java.lang.String name)
           
 java.util.Iterator getNames()
           
 boolean remove(java.lang.String name)
          Removes context value.
 void set(java.lang.String name, java.lang.Object value)
          Sets context value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleContext

public SimpleContext()
Method Detail

get

public java.lang.Object get(java.lang.String name)
Specified by:
get in interface Context

set

public void set(java.lang.String name,
                java.lang.Object value)
Description copied from interface: MutableContext
Sets context value.

Specified by:
set in interface MutableContext

remove

public boolean remove(java.lang.String name)
Description copied from interface: MutableContext
Removes context value.

Specified by:
remove in interface MutableContext
Returns:
true if operation was successful. In some cases removal of name/value pair may not be supported (e.g. chained contexts).

getNames

public java.util.Iterator getNames()
Specified by:
getNames in interface TraversableContext
Returns:
Iterator over names in the context.


Copyright © 2003 Hammurapi Group. All Rights Reserved.