Package uk.me.nxg.unity
Enum Class Syntax
- All Implemented Interfaces:
Serializable
,Comparable<Syntax>
,Constable
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 ConstantsEnum ConstantDescriptionA wildcard ‘syntax’, denoting all available syntaxes.The syntax for CDS-format strings.The formatter (not parser) for debugging output.The syntax for FITS-format strings.The formatter (not parser) for LaTeX/siunitx output.The syntax for OGIP-format strings.The syntax for VOUnit-format strings. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether the syntax is a readable one.boolean
Indicates whether the syntax is a writable one.static Syntax
Look up a syntax enumeration from a string name.toString()
Returns a string version of the syntax namestatic Syntax
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.
-
Enum Constant Details
-
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
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
The syntax for OGIP-format strings. The format defined in OGIP memo OGIP/93-001, 1993 (postscript via FTP) -
CDS
The syntax for CDS-format strings. A syntax based on the CDS document Standards for Astronomical Catalogues, Version 2.0, 2000, specifically section 3.2. Seehttp://cdsweb.u-strasbg.fr/doc/catstd-3.2.htx
-
LATEX
The formatter (not parser) for LaTeX/siunitx output. -
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
A wildcard ‘syntax’, denoting all available syntaxes. This syntax is neither readable nor writable.
-
-
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
-
toString
Returns a string version of the syntax name -
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 forALL
.- Returns:
- true if the syntax is writable
-
lookup
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
-