Package hec.data

Class ParamInteger

java.lang.Object
hec.data.ParamInteger

public class ParamInteger extends Object
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

    Constructors
    Constructor
    Description
    Simple constructor that creates a new ParamIneteger object with a UNDEFINED integer value and a null parameter
    ParamInteger(int val, int paramID)
    Creates a new ParamInteger object with the given integer value and parameter value.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the paramter object that describes the integer value.
    int
     
    int
    Returns the integer value of this object
    void
    setParameterId(int paramID)
    Sets the new parameter for this object
    void
    setUnitSystem(int system)
     
    void
    setValue(int val)
    Sets the new integer value for this object
    void
    Takes a String representation of an integer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void setValue(String val)
      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()