# 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.

Since:
  9 Jul 2021
Author:
  Mark Taylor

## Nested Class Summary

### Nested classes/interfaces inherited from class Enum

`Enum.EnumDesc<E>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`BAD_SYNTAX`
Cannot be parsed as VOUnit.
`DEPRECATED`
Contains some units deprecated in VOUnits standard.
`GUESSED_UNIT`
Parsed as VOUnit but contains unknown though guessable units.
`OK`
Conforms to VOUnits standard.
`PARSE_ERROR`
Cannot be parsed as VOUnit (shouldn't happen).
`UNKNOWN_UNIT`
Parsed as VOUnit but contains unknown base units.
`USAGE`
Violates VOUnit usage constraints.
`WHITESPACE`
Legal VOUnit except that it contains illegal whitespace.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isError()`
Indicates whether this code represents an invalid VOUnit specification.
`boolean`
`isWarning()`
Indicates whether this status represents a UCD value which may deserve attention, but is not actually a standards violation.
`static UnitStatus.Code`
`valueOf(String name)`
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.

### Methods inherited from class Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class Object

`getClass, notify, notifyAll, wait, wait, wait`

## 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