Nitido Inc.

com.nitido.util
Class OpenParameterContainer

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

public class OpenParameterContainer
extends java.lang.Object
implements OpenParameterList

The OpenParameterContainer class is used to store a series of multi-valued name/value pair String objects.

See Also:
Serialized Form

Field Summary
protected  OpenHash pairs
           
 
Constructor Summary
OpenParameterContainer()
          Empty constructor.
OpenParameterContainer(java.util.Hashtable hash)
          Construct an OpenParameterContainer using the contents of a Hashtable.
OpenParameterContainer(OpenHash hash)
          Construct an OpenParameterContainer using the contents of an OpenHash.
OpenParameterContainer(OpenParameterList list)
          Construct a OpenParameterContainer using the contents of an OpenParameterList.
 
Method Summary
 void clear()
          Removes all parameters from this container.
 java.lang.String getParameter(java.lang.String name)
          Returns the first instance of 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.
 java.util.Enumeration getParameters(java.lang.String name)
          Returns an Enumeration of all of the values matching the specified name.
 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 all values that match the specified parameter.
 void removeParameter(java.lang.String name, java.lang.String value)
          Removes the name/value pair specified.
 int size()
          Returns the size of the parameter list.
 java.lang.String toString()
          Utility method for displaying the content of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pairs

protected OpenHash pairs
Constructor Detail

OpenParameterContainer

public OpenParameterContainer()
Empty constructor.


OpenParameterContainer

public OpenParameterContainer(OpenParameterList list)
Construct a OpenParameterContainer using the contents of an OpenParameterList.

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

OpenParameterContainer

public OpenParameterContainer(OpenHash hash)
Construct an OpenParameterContainer using the contents of an OpenHash. Any name/value pair in the OpenHash where the key or the value is not a String object will not be inserted into the container.

Parameters:
hash - The OpenHash whose values are copied into this container.

OpenParameterContainer

public OpenParameterContainer(java.util.Hashtable hash)
Construct an OpenParameterContainer using the contents of a Hashtable. Any name/value pair in the OpenHash 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 first instance of the specified parameter.

Specified by:
getParameter in interface OpenParameterList
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.

getParameters

public java.util.Enumeration getParameters(java.lang.String name)
Returns an Enumeration of all of the values matching the specified name.

Specified by:
getParameters in interface OpenParameterList
Parameters:
name - The name of the set of values to return.
Returns:
An Enumeration of String objects containing the values matching the name passed in.

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.


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.

removeParameter

public void removeParameter(java.lang.String name)
Removes all values that match the specified parameter.

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

removeParameter

public void removeParameter(java.lang.String name,
                            java.lang.String value)
Removes the name/value pair specified.

Parameters:
name - The name in the name/value pair to remove.
value - The value in the name/value pair to remove.

toString

public java.lang.String toString()
Utility method for displaying the content of this object.

Overrides:
toString in class java.lang.Object

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.