javawrapper::ModelEnum Class Reference

Packages a data value with other information. More...

Inheritance diagram for javawrapper::ModelEnum:

javawrapper::ModelData List of all members.

Public Member Functions

 ModelEnum (int[] p_iAllowedValues, String[] p_sValueLabels, String sDescriptor, String sXMLTag)
 Constructor.
String toString ()
 Required overridden method.
void SetValue (int iValue) throws ModelException
 Sets the value.
void SetValue (String sValue) throws ModelException
 Sets the value using one of the string literals.
int GetValue ()
 Gets the integer value.
String GetStringValue ()
 Get the string label corresponding to the current integer value.
int[] GetAllowedValues ()
 Gets the set of all allowed values.
String[] GetAllowedValueLabels ()
 Gets the set of allowed value labels.
boolean equals (Object oTest)
 Overriding equality tester.

Protected Attributes

int m_iValue
 Variable's value.
int[] mp_iAllowedValues
String[] mp_sValueLabels

Detailed Description

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: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


Constructor & Destructor Documentation

javawrapper::ModelEnum::ModelEnum int[]  p_iAllowedValues,
String[]  p_sValueLabels,
String  sDescriptor,
String  sXMLTag
[inline]
 

Constructor.

Parameters:
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.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)


Member Function Documentation

boolean javawrapper::ModelEnum::equals Object  oTest  )  [inline]
 

Overriding equality tester.

Parameters:
oTest Object to test for equality
Returns:
true if the objects have equal values, false if not.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

String [] javawrapper::ModelEnum::GetAllowedValueLabels  )  [inline]
 

Gets the set of allowed value labels.

Returns:
The set of allowed value labels.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

int [] javawrapper::ModelEnum::GetAllowedValues  )  [inline]
 

Gets the set of all allowed values.

Returns:
The set of allowed values.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

String javawrapper::ModelEnum::GetStringValue  )  [inline]
 

Get the string label corresponding to the current integer value.

Returns:
String label for the current integer value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

int javawrapper::ModelEnum::GetValue  )  [inline]
 

Gets the integer value.

Returns:
The integer value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::ModelEnum::SetValue String  sValue  )  throws ModelException [inline]
 

Sets the value using one of the string literals.

Parameters:
sValue String value.
Exceptions:
ModelException if the string literal does not correspond to an allowed value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void javawrapper::ModelEnum::SetValue int  iValue  )  throws ModelException [inline]
 

Sets the value.

Parameters:
iValue Value to set.
Exceptions:
ModelException if the value is not an allowed value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

String javawrapper::ModelEnum::toString  )  [inline, virtual]
 

Required overridden method.

Returns:
String representation of the value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Implements javawrapper::ModelData.


The documentation for this class was generated from the following file:
Generated on Mon Mar 27 15:15:41 2006 for SORTIE Java Interface by  doxygen 1.4.6-NO