Package hec.lang

Class UnitsType

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, Serializable, Cloneable, Comparable, Observer, Modifiable

public class UnitsType extends NamedType
Describes the units system that is in use.
See Also:
  • Field Details

    • _unitsSystem

      protected String _unitsSystem
      A String describing current units system in use.
    • _unitsType

      protected int _unitsType
      An int identifying the current units in use.
    • UNITS_ENGLISH

      public static final int UNITS_ENGLISH
      The constant for English units.
      See Also:
    • UNITS_SI

      public static final int UNITS_SI
      The constant for SI units.
      See Also:
  • Constructor Details

    • UnitsType

      public UnitsType()
      Constructs the default UnitsType as a default NamedType with the units system set as "SI Units" and the units type set as UNITS_SI.
    • UnitsType

      public UnitsType(String system, int type)
      Constructs a default UnitsType with the system set to the String argument system, and the type set to the int argument type.
    • UnitsType

      public UnitsType(int type, String system)
      Constructs a default UnitsType with the system set to the String argument system, and the type set to the int argument type.
  • Method Details

    • setUnitsSystem

      public void setUnitsSystem(String system)
      Sets the units system to the String argument.
    • getUnitsSystem

      public String getUnitsSystem()
      Returns a String describing the current units system.
    • setUnitsType

      public void setUnitsType(int type)
      Sets the units type to the int argument.
    • getUnitsType

      public int getUnitsType()
      Returns an int identifying the current units type.