Enum Class UnitType

java.lang.Object
java.lang.Enum<UnitType>
hdi.model.enumtype.UnitType
All Implemented Interfaces:
EdiQualifier, Serializable, Comparable<UnitType>, Constable

public enum UnitType extends Enum<UnitType> implements EdiQualifier
  • Enum Constant Details

    • DAYS

      public static final UnitType DAYS
    • MONTH

      public static final UnitType MONTH
    • UNIT

      public static final UnitType UNIT
    • MINUTES

      public static final UnitType MINUTES
    • POUND

      public static final UnitType POUND
    • MILES

      public static final UnitType MILES
    • INTERNATIONAL_UNIT

      public static final UnitType INTERNATIONAL_UNIT
    • GRAM

      public static final UnitType GRAM
    • MILLIGRAM

      public static final UnitType MILLIGRAM
    • MILLILITER

      public static final UnitType MILLILITER
  • Method Details

    • values

      public static UnitType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UnitType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromEdi

      public static UnitType fromEdi(String ediCode)
    • unitLabel

      public static String unitLabel(UnitType unitType, Number quantity)
    • ediValue

      public String ediValue()
      Specified by:
      ediValue in interface EdiQualifier
    • desc

      public String desc()
      Specified by:
      desc in interface EdiQualifier