Enum Class UnitStatus.Code

java.lang.Object
java.lang.Enum<UnitStatus.Code>
uk.ac.starlink.vo.UnitStatus.Code
All Implemented Interfaces:
Serializable, Comparable<UnitStatus.Code>, Constable
Enclosing class:
UnitStatus

public static enum UnitStatus.Code extends Enum<UnitStatus.Code>
Characterises VOUnits standard conformance.
  • Enum Constant Details

    • OK

      public static final UnitStatus.Code OK
      Conforms to VOUnits standard.
    • DEPRECATED

      public static final UnitStatus.Code DEPRECATED
      Contains some units deprecated in VOUnits standard.
    • UNKNOWN_UNIT

      public static final UnitStatus.Code UNKNOWN_UNIT
      Parsed as VOUnit but contains unknown base units.
    • GUESSED_UNIT

      public static final UnitStatus.Code GUESSED_UNIT
      Parsed as VOUnit but contains unknown though guessable units.
    • BAD_SYNTAX

      public static final UnitStatus.Code BAD_SYNTAX
      Cannot be parsed as VOUnit.
    • PARSE_ERROR

      public static final UnitStatus.Code PARSE_ERROR
      Cannot be parsed as VOUnit (shouldn't happen).
    • USAGE

      public static final UnitStatus.Code USAGE
      Violates VOUnit usage constraints.
    • WHITESPACE

      public static final UnitStatus.Code WHITESPACE
      Legal VOUnit except that it contains illegal whitespace.
  • Method Details

    • values

      public static UnitStatus.Code[] 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 UnitStatus.Code 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
    • isError

      public boolean isError()
      Indicates whether this code represents an invalid VOUnit specification.
      Returns:
      true for error status
    • isWarning

      public boolean isWarning()
      Indicates whether this status represents a UCD value which may deserve attention, but is not actually a standards violation. Note this includes use of unknown and non-standard, as well as deprecated, units that are still syntactically permissible.
      Returns:
      true for warning status