SORTIE Java Interface
1
|
Packages a data value with other information. More...
Public Member Functions | |
ModelEnum (int[] p_iAllowedValues, String[] p_sValueLabels, String sDescriptor, String sXMLTag) | |
Constructor. More... | |
String | toString () |
Required overridden method. More... | |
void | setValue (int iValue) throws ModelException |
Sets the value. More... | |
void | setValue (String sValue) throws ModelException |
Sets the value using one of the string literals. More... | |
int | getValue () |
Gets the integer value. More... | |
String | getStringValue () |
Get the string label corresponding to the current integer value. More... | |
int [] | getAllowedValues () |
Gets the set of all allowed values. More... | |
String [] | getAllowedValueLabels () |
Gets the set of allowed value labels. More... | |
boolean | equals (Object oTest) |
Overriding equality tester. More... | |
Object | clone () |
Clones this object. More... | |
Public Member Functions inherited from sortie.data.simpletypes.ModelData | |
ModelData (String sDescriptor, String sXMLTag) | |
Constructor. More... | |
String | getDescriptor () |
Returns the descriptor string. More... | |
void | setDescriptor (String sDescriptor) |
Sets the descriptor string. More... | |
String | getXMLTag () |
Returns the XML tag associated with this piece of data. More... | |
abstract String | toString () |
String representation of the value. More... | |
void | setXMLTag (String sXMLTag) |
Sets the XML tag associated with this piece of data. More... | |
Protected Attributes | |
int | m_iValue |
Variable's value. More... | |
int [] | mp_iAllowedValues |
Set of allowed values. More... | |
String [] | mp_sValueLabels |
Label to display for each value. More... | |
Protected Attributes inherited from sortie.data.simpletypes.ModelData | |
String | m_sDescriptor |
Descriptive string. More... | |
Packages a data value with other information.
This object has a limited number of values it can accept.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Cary Institute of Ecosystem Studies
Edit history:
---------------—
April 28, 2004: Submitted in beta version (LEM)
sortie.data.simpletypes.ModelEnum.ModelEnum | ( | int [] | p_iAllowedValues, |
String [] | p_sValueLabels, | ||
String | sDescriptor, | ||
String | sXMLTag | ||
) |
Constructor.
p_iAllowedValues | Allowed values. |
p_sValueLabels | Text label for each allowed value. Optional. |
sDescriptor | Descriptor string. |
sXMLTag | The XML tag associated with this piece of data. |
Object sortie.data.simpletypes.ModelEnum.clone | ( | ) |
Clones this object.
boolean sortie.data.simpletypes.ModelEnum.equals | ( | Object | oTest | ) |
Overriding equality tester.
oTest | Object to test for equality |
String [] sortie.data.simpletypes.ModelEnum.getAllowedValueLabels | ( | ) |
Gets the set of allowed value labels.
int [] sortie.data.simpletypes.ModelEnum.getAllowedValues | ( | ) |
Gets the set of all allowed values.
String sortie.data.simpletypes.ModelEnum.getStringValue | ( | ) |
Get the string label corresponding to the current integer value.
int sortie.data.simpletypes.ModelEnum.getValue | ( | ) |
Gets the integer value.
void sortie.data.simpletypes.ModelEnum.setValue | ( | int | iValue | ) | throws ModelException |
Sets the value.
iValue | Value to set. |
ModelException | if the value is not an allowed value. |
void sortie.data.simpletypes.ModelEnum.setValue | ( | String | sValue | ) | throws ModelException |
Sets the value using one of the string literals.
sValue | String value. |
ModelException | if the string literal does not correspond to an allowed value. |
String sortie.data.simpletypes.ModelEnum.toString | ( | ) |
Required overridden method.
|
protected |
Variable's value.
|
protected |
Set of allowed values.
|
protected |
Label to display for each value.