Package uk.me.nxg.unity

# Enum Class Syntax

java.lang.Object
java.lang.Enum<Syntax>
uk.me.nxg.unity.Syntax

All Implemented Interfaces:
  `Serializable`, `Comparable<Syntax>`, `Constable`

public enum Syntax extends Enum<Syntax>
An enumeration of the allowed syntaxes within the Unity libary.

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`ALL`
A wildcard ‘syntax’, denoting all available syntaxes.
`CDS`
The syntax for CDS-format strings.
`DEBUG`
The formatter (not parser) for debugging output.
`FITS`
The syntax for FITS-format strings.
`LATEX`
The formatter (not parser) for LaTeX/siunitx output.
`OGIP`
The syntax for OGIP-format strings.
`VOUNITS`
The syntax for VOUnit-format strings.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isReadable()`
Indicates whether the syntax is a readable one.
`boolean`
`isWritable()`
Indicates whether the syntax is a writable one.
`static Syntax`
`lookup(String name)`
Look up a syntax enumeration from a string name.
`String`
`toString()`
Returns a string version of the syntax name
`static Syntax`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static Syntax[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

### Methods inherited from class java.lang.Enum

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

### Methods inherited from class java.lang.Object

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

## Enum Constant Details

### VOUNITS

public static final Syntax VOUNITS
The syntax for VOUnit-format strings. This is intended to be as nearly as possible in the intersection of the various other grammars. It is a strict subset of the FITS and CDS grammars (in the sense that any VOUnit unit string is a valid FITS and CDS string, too), and it is almost a subset of the OGIP grammar, except that it uses the dot for multiplication rather than star. See IVOA VOUnits Proposed Recommendation.

### FITS

public static final Syntax FITS
The syntax for FITS-format strings. Parses unit strings according to the prescriptions in the FITS specification, v3.0, section 4.3 (W.D. Pence et al., A&A 524, A42, 2010. doi:10.1051/0004-6361/201015362).

### OGIP

public static final Syntax OGIP
The syntax for OGIP-format strings. The format defined in OGIP memo OGIP/93-001, 1993)

### CDS

public static final Syntax CDS
The syntax for CDS-format strings. A syntax based on the CDS document Standards for Astronomical Catalogues, Version 2.0, 2000, specifically. See `section 3.2`

### LATEX

public static final Syntax LATEX
The formatter (not parser) for LaTeX/siunitx output.

### DEBUG

public static final Syntax DEBUG
The formatter (not parser) for debugging output. This is intended to display the results of a parse unambiguously. The format of the output is not specified, and may change without notice.

### ALL

public static final Syntax ALL
A wildcard ‘syntax’, denoting all available syntaxes. This syntax is neither readable nor writable.

## Method Details

### values

public static Syntax[] 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 Syntax 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

### toString

public String toString()
Returns a string version of the syntax name

Overrides:
  `toString` in class `Enum<Syntax>`

### isReadable

public boolean isReadable()
Indicates whether the syntax is a readable one. The LaTeX and ‘debug’ syntaxes, for example, are write-only.

Returns:
  true if the syntax is readable

### isWritable

public boolean isWritable()
Indicates whether the syntax is a writable one. At present, all the syntaxes are writable, except for `ALL`.

Returns:
  true if the syntax is writable

### lookup

public static Syntax lookup(String name)
Look up a syntax enumeration from a string name.

Parameters:
  `name` - the name of a syntax
Returns:
  a Syntax, or null if the name was not recognised