clarion.options
Class Parameter

java.lang.Object
  extended byclarion.options.Parameter
All Implemented Interfaces:
java.lang.Cloneable

public class Parameter
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
protected  int curNum
          the number of values in this parameter.
protected  java.lang.String label
          the parameter label.
protected  int majorType
          major type.
protected  int minorType
          minor type.
protected  java.lang.String value
          the value of the parameter.
protected  java.lang.String[] values
          the values of the parameter.
 
Constructor Summary
Parameter(int majorType, int minorType, java.lang.String label, int num, java.lang.String[] vals)
          constructor.
Parameter(int majorType, int minorType, java.lang.String label, java.lang.String value)
          constructor.
Parameter(int majorType, int minorType, java.lang.String label, java.lang.String[] vals)
          constructor.
 
Method Summary
 java.lang.Object clone()
          methods from class Object
 boolean getBoolValue()
          Returns the boolean value if this parameter is a boolean type.
 boolean[] getBoolValues()
          Returns the boolean values if this parameter is a boolean array type.
 int getCount()
          Returns the number of parameter values.
 double getDoubleValue()
          Returns the double value if this parameter is a double type.
 double[] getDoubleValues()
          Returns the double values if this parameter is a double array type.
 int getIntValue()
          Returns the integer value if this parameter is an integer type.
 short[] getIntValues()
          Returns the integer values if this parameter is an integer array type.
 java.lang.String getLabel()
          Returns the label of this parameter.
 int getMajorType()
          Returns the major type of this parameter.
 int getMinorType()
          Returns the minor type of this parameter.
 java.lang.String getStringValue()
          Returns the string value if this parameter is a string type.
 java.lang.String[] getStringValues()
          Returns the string values if this parameter is a string array type.
 void setBoolValue(boolean val)
          Sets the boolean value if this paramter is a boolean type.
 void setBoolValue(int idx, boolean val)
          Sets a specific element in the parameter array with a specific boolean value if this paramter is a boolean array type.
 void setCount(int num)
          Sets the number of paramter values.
 void setDoubleValue(double val)
          Sets the double value if this paramter is a double type.
 void setDoubleValue(int idx, double val)
          Sets a specific element in the parameter array with a specific double value if this paramter is a double array type.
 void setIntValue(int val)
          Sets the integer value if this paramter is an integer type.
 void setIntValue(int idx, int val)
          Sets a specific element in the parameter array with a specific integer value if this paramter is an integer array type.
 void setLabel(java.lang.String str)
          Sets the parameter label.
 void setStringValue(int idx, java.lang.String val)
          Sets a specific element in the parameter array with a specific string value if this paramter is a string array type.
 void setStringValue(java.lang.String val)
          Sets the string value if this paramter is a string type.
 java.lang.String toString()
          methods from class Object
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

curNum

protected int curNum
the number of values in this parameter.


majorType

protected int majorType
major type. 0: primitive, 1: array.


minorType

protected int minorType
minor type. 0: boolean, 1: int, 2: double, 3: string.


label

protected java.lang.String label
the parameter label.


value

protected java.lang.String value
the value of the parameter.


values

protected java.lang.String[] values
the values of the parameter.

Constructor Detail

Parameter

public Parameter(int majorType,
                 int minorType,
                 java.lang.String label,
                 java.lang.String value)
constructor.

Parameters:
majorType - the major type.
minorType - the minor type.
label - the paramter label.
value - the parameter value.

Parameter

public Parameter(int majorType,
                 int minorType,
                 java.lang.String label,
                 java.lang.String[] vals)
constructor.

Parameters:
majorType - the major type.
minorType - the minor type.
label - the paramter label.

Parameter

public Parameter(int majorType,
                 int minorType,
                 java.lang.String label,
                 int num,
                 java.lang.String[] vals)
constructor.

Parameters:
majorType - the major type.
minorType - the minor type.
label - the paramter label.
num - the number of parameter values.
Method Detail

getMajorType

public int getMajorType()
Returns the major type of this parameter.

Returns:
the major type.

getMinorType

public int getMinorType()
Returns the minor type of this parameter.

Returns:
the minor type.

getLabel

public java.lang.String getLabel()
Returns the label of this parameter.

Returns:
the label of this parameter.

getCount

public int getCount()
Returns the number of parameter values.

Returns:
the number of parameter values.

getBoolValue

public boolean getBoolValue()
Returns the boolean value if this parameter is a boolean type.

Returns:
the boolean value.

getIntValue

public int getIntValue()
Returns the integer value if this parameter is an integer type.

Returns:
the integer value.

getDoubleValue

public double getDoubleValue()
Returns the double value if this parameter is a double type.

Returns:
the double value.

getStringValue

public java.lang.String getStringValue()
Returns the string value if this parameter is a string type.

Returns:
the string value.

getBoolValues

public boolean[] getBoolValues()
Returns the boolean values if this parameter is a boolean array type.

Returns:
the boolean values.

getIntValues

public short[] getIntValues()
Returns the integer values if this parameter is an integer array type.

Returns:
the integer values.

getDoubleValues

public double[] getDoubleValues()
Returns the double values if this parameter is a double array type.

Returns:
the double values.

getStringValues

public java.lang.String[] getStringValues()
Returns the string values if this parameter is a string array type.

Returns:
the string values.

setLabel

public void setLabel(java.lang.String str)
Sets the parameter label.

Parameters:
str - the label to set.

setCount

public void setCount(int num)
Sets the number of paramter values.

Parameters:
num - the number to set.

setBoolValue

public void setBoolValue(boolean val)
Sets the boolean value if this paramter is a boolean type.

Parameters:
val - the value to set.

setIntValue

public void setIntValue(int val)
Sets the integer value if this paramter is an integer type.

Parameters:
val - the value to set.

setDoubleValue

public void setDoubleValue(double val)
Sets the double value if this paramter is a double type.

Parameters:
val - the value to set.

setStringValue

public void setStringValue(java.lang.String val)
Sets the string value if this paramter is a string type.

Parameters:
val - the value to set.

setBoolValue

public void setBoolValue(int idx,
                         boolean val)
Sets a specific element in the parameter array with a specific boolean value if this paramter is a boolean array type.

Parameters:
idx - the index of the element.
val - the value to set.

setIntValue

public void setIntValue(int idx,
                        int val)
Sets a specific element in the parameter array with a specific integer value if this paramter is an integer array type.

Parameters:
idx - the index of the element.
val - the value to set.

setDoubleValue

public void setDoubleValue(int idx,
                           double val)
Sets a specific element in the parameter array with a specific double value if this paramter is a double array type.

Parameters:
idx - the index of the element.
val - the value to set.

setStringValue

public void setStringValue(int idx,
                           java.lang.String val)
Sets a specific element in the parameter array with a specific string value if this paramter is a string array type.

Parameters:
idx - the index of the element.
val - the value to set.

toString

public java.lang.String toString()
methods from class Object


clone

public java.lang.Object clone()
methods from class Object