Package : cam.dataxchg
The ParameterList class provides a means encapsulating a list of parameters. An instance of the class is an array of parameter data items consisting of a parameter value and a parameter name. Methods of the class provide a means of specifying and accessing items of this list.
The values of the parameter items can be accessed either by its string name or by an integer index. The parameter names are accessed by integer index. The parameter data types supported are int, long, float, double, char, boolean, String, and Object.
The indexing of the items in the parameter list runs from 1 to number of items --- following the conventional way that most humans count.
boolean, char, int, long, float, double, String, Object
Sample program: ParameterListTest.java
Chris Anderson © UCLA 1997
|
Creates an empty list with a default list name of "Parameters". |
|
Creates an empty list with a list name given by S. |
|
Initializes an existing list to an empty list with a default list name of "Parameters". |
|
Initializes an existing list to an empty list with a list name given by S. |
|
Returns the name of the ParameterList instance. |
|
Sets the name of the ParematerList instance to S. |
|
For the item with name S, this function returns one of java.lang.Boolean, java.lang.Character, java.lang.String, java.lang.Integer, java.lang.Long, java.lang.Float, java.lang.Double, or Object. |
|
For the item with index i, this function returns one of java.lang.Boolean, java.lang.Character, java.lang.String, java.lang.Integer, java.lang.Long, java.lang.Float, java.lang.Double, or Object. |
|
Returns the number of items in the list. |
|
Returns the name of the ith item in the list. |
|
Returns the value (as an Object) of the ith item in the list. One must cast the value to the appropriate type before use (or alternately, use the type specific get functions). |
|
Returns the value (as a String) of the ith item in the list. |
|
Outputs to D the ParameterList instance in text (ascii) form. |
|
Outputs to D the ParameterList instance in binary form. |
|
Reads from D the ParameterList instance that has been written to the stream in text (ascii) form. This is the "inverse" of the output (...). |
|
Reads from D the ParameterList instance that has been written to the stream in binary form. This is the "inverse" of the outputBinary(...). |
Add/Set/Get Boolean List Items
|
Adds a boolean value with name Name and value val to the list. |
|
Adds a boolean value with name Name and a default value (= False) to the list. |
|
Returns the value of the boolean item with name Name. |
|
Sets the boolean item with name Name to the value val. |
|
Sets the boolean item with index i to the value val. |
|
Sets the boolean item with index i to the value represented by the String val. |
|
Adds a Char value with name Name and value val to the list. |
|
Adds a Char value with name Name and a default value (null value) to the list. |
|
Returns the value of the Char item with name Name. |
|
Sets the Char item with name Name to the value val. |
|
Sets the Char item with index i to the value val. |
|
Sets the Char item with index i to the value represented by the String val. |
|
Adds a String value with name Name and value val to the list. |
|
Adds a String value with name Name and a default value (null value) to the list. |
|
Returns the value of the String item with name Name. |
|
Sets the String item with name Name to the value val. |
|
Sets the String item with index i to the value val. |
|
Adds an int value with name Name and value val to the list. |
|
Adds an int value with name Name and a default value (null value) to the list. |
|
Returns the value of the int item with name Name. |
|
Sets the int item with name Name to the value val. |
|
Sets the int item with index i to the value val. |
|
Sets the int item with index i to the value represented by the String val. |
|
Adds a long value with name Name and value val to the list. |
|
Adds a long value with name Name and a default value (null value) to the list. |
|
Returns the value of the long item with name Name. |
|
Sets the long item with name Name to the value val. |
|
Sets the long item with index i to the value val. |
|
Sets the long item with index i to the value represented by the String val. |
|
Adds a float value with name Name and value val to the list. |
|
Adds a float value with name Name and a default value (null value) to the list. |
|
Returns the value of the float item with name Name. |
|
Sets the float item with name Name to the value val. |
|
Sets the float item with index i to the value val. |
|
Sets the float item with index i to the value represented by the String val. |
|
Adds a double value with name Name and value val to the list. |
|
Adds a double value with name Name and a default value (null value) to the list. |
|
Returns the value of the double item with name Name. |
|
Sets the double item with name Name to the value val. |
|
Sets the double item with index i to the value val. |
|
Sets the double item with index i to the value represented by the String val. |
|
Adds an Object value with name Name and value val to the list. |
|
Adds an Object value with name Name and a default value (null value) to the list. |
|
Returns the value of the Object item with name Name. |
|
Sets the Object item with name Name to the value val. |
|
Sets the Object item with index i to the value val. |