Package uk.ac.starlink.vo
Enum Class UnitStatus.Code
- All Implemented Interfaces:
Serializable
,Comparable<UnitStatus.Code>
,Constable
- Enclosing class:
- UnitStatus
Characterises VOUnits standard conformance.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCannot be parsed as VOUnit.Contains some units deprecated in VOUnits standard.Parsed as VOUnit but contains unknown though guessable units.Conforms to VOUnits standard.Cannot be parsed as VOUnit (shouldn't happen).Parsed as VOUnit but contains unknown base units.Violates VOUnit usage constraints.Legal VOUnit except that it contains illegal whitespace. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isError()
Indicates whether this code represents an invalid VOUnit specification.boolean
Indicates whether this status represents a UCD value which may deserve attention, but is not actually a standards violation.static UnitStatus.Code
Returns the enum constant of this class with the specified name.static UnitStatus.Code[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OK
Conforms to VOUnits standard. -
DEPRECATED
Contains some units deprecated in VOUnits standard. -
UNKNOWN_UNIT
Parsed as VOUnit but contains unknown base units. -
GUESSED_UNIT
Parsed as VOUnit but contains unknown though guessable units. -
BAD_SYNTAX
Cannot be parsed as VOUnit. -
PARSE_ERROR
Cannot be parsed as VOUnit (shouldn't happen). -
USAGE
Violates VOUnit usage constraints. -
WHITESPACE
Legal VOUnit except that it contains illegal whitespace.
-
-
Method Details
-
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
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 nameNullPointerException
- 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
-