com.generationjava.namespace
Class SimpleNamespace

java.lang.Object
  extended bycom.generationjava.namespace.AbstractNamespace
      extended bycom.generationjava.namespace.SimpleNamespace
All Implemented Interfaces:
Namespace, Serializable

public class SimpleNamespace
extends AbstractNamespace

A simple implementation of a Namespace. It uses a Map to store the values.

See Also:
Serialized Form

Constructor Summary
SimpleNamespace()
          Construct with a default implementation of a HashMap.
SimpleNamespace(Map map)
           
 
Method Summary
 Object getValue(String name)
          Get the value in this namespace under the specified name.
 Iterator iterateNames()
          The names in a Namespace
 void putValue(String name, Object info)
          Put a value in this namespace, under the specified name.
 
Methods inherited from class com.generationjava.namespace.AbstractNamespace
hasValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleNamespace

public SimpleNamespace()
Construct with a default implementation of a HashMap. The HashMap instantiation is lazy.


SimpleNamespace

public SimpleNamespace(Map map)
Method Detail

getValue

public Object getValue(String name)
Description copied from class: AbstractNamespace
Get the value in this namespace under the specified name.

Specified by:
getValue in interface Namespace
Specified by:
getValue in class AbstractNamespace

putValue

public void putValue(String name,
                     Object info)
Description copied from class: AbstractNamespace
Put a value in this namespace, under the specified name.

Specified by:
putValue in interface Namespace
Specified by:
putValue in class AbstractNamespace

iterateNames

public Iterator iterateNames()
Description copied from class: AbstractNamespace
The names in a Namespace

Specified by:
iterateNames in interface Namespace
Specified by:
iterateNames in class AbstractNamespace


Copyright © 2000-2005 OSJava. All Rights Reserved.