oracle.ifs.common
Class ParameterTable


java.lang.Object

  |

  +--java.util.Dictionary

        |

        +--java.util.Hashtable

              |

              +--oracle.ifs.common.ParameterTable

All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class ParameterTable
extends java.util.Hashtable

This class contains a list of named parameters in a Hashtable. It extends hashtable by providing a constructor to convert from a String [] of args in the forms of "key=value", where value can represent a string, integer or boolean.
This class is used parsing command line and parameter file based args. It is typically used for command line type programs, and for constructing tests,

See Also:
Serialized Form

Method Summary
 java.lang.Boolean getBoolean(java.lang.String name)
          Returns a Boolean object representing the first occurance of the passed name in an name/value pair.
 boolean getBoolean(java.lang.String name, boolean defaultValue)
          Returns a boolean representing the first occurance of the passed name in an name/value pair.
 java.lang.Integer getInteger(java.lang.String name)
          Returns an Integer object representing the first occurance of the passed name in an name/value pair.
 int getInteger(java.lang.String name, int defaultValue)
          Returns an int representing the first occurance of the passed name in an name/value pair.
 java.lang.Long getLong(java.lang.String name)
          Returns an Long object representing the first occurance of the passed name in an name/value pair.
 long getLong(java.lang.String name, long defaultValue)
          Returns an long representing the first occurance of the passed name in an name/value pair.
 java.lang.String getString(java.lang.String name)
          Returns a String object representing the first occurance of the passed name in an name/value pair.
 java.lang.String getString(java.lang.String name, java.lang.String defaultValue)
          Returns a String object representing the first occurance of the passed name in an name/value pair.
 java.lang.String[] getStrings(java.lang.String name)
          Returns a Strings array object for a named parameter.
 

Method Detail


getString


public java.lang.String getString(java.lang.String name)
Returns a String object representing the first occurance of the passed name in an name/value pair. If no parameter matching the name can be found null is returned.
Parameters:
name - The parameter name in a name value pair.
Returns:
A String object corresponding to the name's value, or null if the name cannot be found.

getString


public java.lang.String getString(java.lang.String name,
                                  java.lang.String defaultValue)
Returns a String object representing the first occurance of the passed name in an name/value pair. If no parameter matching the name can be found, the specified default value is returned.
Parameters:
name - The parameter name in a name value pair.
defaultValue - Value to reutn if name is not found
Returns:
A String object corresponding to the name's value, or defaultValue if the name cannot be found.

getStrings


public java.lang.String[] getStrings(java.lang.String name)
Returns a Strings array object for a named parameter. If the value was not multivalued, just return an array with one element.
Parameters:
name - The parameter name in a name value pair.
Returns:
A String array corresponding to the name's value, or null if the name cannot be found.

getInteger


public java.lang.Integer getInteger(java.lang.String name)
Returns an Integer object representing the first occurance of the passed name in an name/value pair. If no parameter matching the name can be found null is returned.
Parameters:
name - The parameter name in a name value pair.
Returns:
An Integer object corresponding to the name's value, or null if the name cannot be found.

getInteger


public int getInteger(java.lang.String name,
                      int defaultValue)
Returns an int representing the first occurance of the passed name in an name/value pair. If no parameter matching the name can be found, the default value is returned.
Parameters:
name - The parameter name in a name value pair.
defaultValue - Default value if name is not found.
Returns:
An Integer object corresponding to the name's value, or null if the name cannot be found.

getLong


public java.lang.Long getLong(java.lang.String name)
Returns an Long object representing the first occurance of the passed name in an name/value pair. If no parameter matching the name can be found null is returned.
Parameters:
name - The parameter name in a name value pair.
Returns:
An Long object corresponding to the name's value, or null if the name cannot be found.

getLong


public long getLong(java.lang.String name,
                    long defaultValue)
Returns an long representing the first occurance of the passed name in an name/value pair. If no parameter matching the name can be found, the default value is returned.
Parameters:
name - The parameter name in a name value pair.
defaultValue - Default value if name is not found.
Returns:
An Long object corresponding to the name's value, or null if the name cannot be found.

getBoolean


public java.lang.Boolean getBoolean(java.lang.String name)
Returns a Boolean object representing the first occurance of the passed name in an name/value pair. If no parameter matching the name can be found null is returned.
Parameters:
name - The parameter name in a name value pair.
Returns:
A Boolean object corresponding to the name's value, or null if the name cannot be found.

getBoolean


public boolean getBoolean(java.lang.String name,
                          boolean defaultValue)
Returns a boolean representing the first occurance of the passed name in an name/value pair. If no parameter matching the name can be found, the default value is returned.
Parameters:
name - The parameter name in a name value pair.
defaultValue - Default value if name is not found.
Returns:
A Boolean object corresponding to the name's value, or null if the name cannot be found.