Package hec.data
Class ParamInteger
java.lang.Object
hec.data.ParamInteger
The ParamInteger class acts as a simple wrapper around a integer primitive. This class provided the ability to add meaning
to a integer primitive by associating it with a certain Parameter, such as "ELEVATION". This allows the appropriate units
type to retreived to represent the integer value in any unit system the Paramter supports.
- Since:
- January 23, 2001
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimple constructor that creates a new ParamIneteger object with a UNDEFINED integer value and a null parameterParamInteger
(int val, int paramID) Creates a new ParamInteger object with the given integer value and parameter value. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the paramter object that describes the integer value.int
int
getValue()
Returns the integer value of this objectvoid
setParameterId
(int paramID) Sets the new parameter for this objectvoid
setUnitSystem
(int system) void
setValue
(int val) Sets the new integer value for this objectvoid
Takes a String representation of an integer.
-
Constructor Details
-
ParamInteger
public ParamInteger()Simple constructor that creates a new ParamIneteger object with a UNDEFINED integer value and a null parameter -
ParamInteger
public ParamInteger(int val, int paramID) Creates a new ParamInteger object with the given integer value and parameter value.
-
-
Method Details
-
setParameterId
public void setParameterId(int paramID) Sets the new parameter for this object- Parameters:
paramID
- The parameter ID to set.
-
setValue
public void setValue(int val) Sets the new integer value for this object- Parameters:
val
-
-
setValue
Takes a String representation of an integer. If the string does not parse correctly then the value will be set to java.lang.Integer.MIN_VALUE ie RMACosnt.UNDEF_INT -
getValue
public int getValue()Returns the integer value of this object -
getParameterId
public int getParameterId()Returns the paramter object that describes the integer value. -
setUnitSystem
public void setUnitSystem(int system) -
getUnitSystem
public int getUnitSystem()
-