Nitido Inc.

com.nitido.util
Class ParameterContainer

java.lang.Object
  extended by com.nitido.util.ParameterContainer
All Implemented Interfaces:
ParameterList, java.io.Serializable

public class ParameterContainer
extends java.lang.Object
implements ParameterList

The ParameterContainer class is used to store a series of name/value pair String objects.

See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable pairs
           
 
Constructor Summary
ParameterContainer()
          Empty constructor.
ParameterContainer(java.util.Hashtable hash)
          Construct a ParameterContainer using the contents of a Hashtable.
ParameterContainer(ParameterList list)
          Construct a ParameterContainer using the contents of a ParameterList.
 
Method Summary
 void clear()
          Removes all parameters from this container.
 java.lang.String getParameter(java.lang.String name)
          Returns the specified parameter.
 java.util.Enumeration getParameterNames()
          Returns an Enumeration of the names of the parameters in this container.
 java.util.Enumeration getParameterNameSet(java.lang.String startsWith)
          Returns an Enumeration of names of parameters that start with the specified attribute.
 void putParameter(java.lang.String name, java.lang.String value)
          Inserts a name/value parameter pair into the container.
 void removeParameter(java.lang.String name)
          Removes a specified parameter.
 int size()
          Returns the size of the parameter list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pairs

protected java.util.Hashtable pairs
Constructor Detail

ParameterContainer

public ParameterContainer()
Empty constructor.


ParameterContainer

public ParameterContainer(ParameterList list)
Construct a ParameterContainer using the contents of a ParameterList.

Parameters:
list - The ParameterList object whose values are copied into this container.

ParameterContainer

public ParameterContainer(java.util.Hashtable hash)
Construct a ParameterContainer using the contents of a Hashtable. Any key/value pair in the Hashtable where the key or the value is not a String object will not be inserted into the container.

Parameters:
hash - The Hashtable whose values are copied into this container.
Method Detail

getParameter

public java.lang.String getParameter(java.lang.String name)
Returns the specified parameter.

Specified by:
getParameter in interface ParameterList
Parameters:
name - The name of the parameter whose value is to be returned.
Returns:
The parameter corresponding to the name passed in, or null if there is no corresponding parameter.

getParameterNames

public java.util.Enumeration getParameterNames()
Returns an Enumeration of the names of the parameters in this container.

Specified by:
getParameterNames in interface ParameterList
Returns:
Returns an Enumeration of the names of the parameters in this container.

getParameterNameSet

public java.util.Enumeration getParameterNameSet(java.lang.String startsWith)
Returns an Enumeration of names of parameters that start with the specified attribute.

Specified by:
getParameterNameSet in interface ParameterList
Parameters:
startsWith - A String specifying to match parameter names against.
Returns:
An Enumeration of paramter names that match the specified startsWith attribute.

putParameter

public void putParameter(java.lang.String name,
                         java.lang.String value)
Inserts a name/value parameter pair into the container.

Parameters:
name - The name of the parameter.
value - The value of the parameter.

clear

public void clear()
Removes all parameters from this container.


removeParameter

public void removeParameter(java.lang.String name)
Removes a specified parameter.

Parameters:
name - The name of the parameter to remove from this container.

size

public int size()
Returns the size of the parameter list.

Specified by:
size in interface ParameterList
Returns:
int that indicates the size of the list.

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.