# Index

A C D E F G H I K L M N O P R S T U V W
All Classes and Interfaces|All Packages|Serialized Form

## A

ALL - Enum constant in enum class uk.me.nxg.unity.Syntax
  A wildcard ‘syntax’, denoting all available syntaxes.
allUnitsRecognised() - Method in class uk.me.nxg.unity.UnitExpr
  Indicates whether the parsed expression is composed only units which are recognised in at least one syntax, and including guesses.
allUnitsRecognised(Syntax) - Method in class uk.me.nxg.unity.UnitExpr
  Indicates whether the parsed expression is composed only of recognised units, in the sense of `OneUnit.isRecognisedUnit(uk.me.nxg.unity.Syntax)`, and excluding guesses.
allUnitsRecognised(Syntax, boolean) - Method in class uk.me.nxg.unity.UnitExpr
  Indicates whether the parsed expression is composed only of recognised units, in the sense of `OneUnit.isRecognisedUnit(uk.me.nxg.unity.Syntax)`, plus a test of whether we should or should not include units which were identified via the guessing mechanism.
allUnitsRecommended(Syntax) - Method in class uk.me.nxg.unity.UnitExpr
  Indicates whether the parsed expression is composed only of recommended units, in the sense of `OneUnit.isRecommendedUnit(uk.me.nxg.unity.Syntax)`.
allUsageConstraintsSatisfied(Syntax) - Method in class uk.me.nxg.unity.UnitExpr
  Indicates whether the expression is being used in a way which satisfies any usage constraints, in the sense of `OneUnit.satisfiesUsageConstraints(uk.me.nxg.unity.Syntax)`.
AMOUNT - Enum constant in enum class uk.me.nxg.unity.Dimensions.BaseQuantity

## C

canonicalize() - Method in class uk.me.nxg.unity.UnitExpr
  Returns a new UnitExpr, representing the same expression, but with the units in some canonical order (not specified here, but consistent within a library release).
CDS - Enum constant in enum class uk.me.nxg.unity.Syntax
  The syntax for CDS-format strings.
compareTo(FunctionDefinition) - Method in class uk.me.nxg.unity.FunctionDefinition
  Provides a sorting order for definitions.
compareTo(OneUnit) - Method in class uk.me.nxg.unity.FunctionOfUnit
compareTo(OneUnit) - Method in class uk.me.nxg.unity.OneUnit
compareTo(OneUnit) - Method in class uk.me.nxg.unity.SimpleUnit
compareTo(UnitDefinition) - Method in class uk.me.nxg.unity.UnitDefinition
compareTo(UnitExpr) - Method in class uk.me.nxg.unity.UnitExpr
  Provides an ordering for UnitExpr instances.
CURRENT - Enum constant in enum class uk.me.nxg.unity.Dimensions.BaseQuantity

## D

DEBUG - Enum constant in enum class uk.me.nxg.unity.Syntax
  The formatter (not parser) for debugging output.
Demo - Search tag in package uk.me.nxg.unity
  Section
description() - Method in class uk.me.nxg.unity.FunctionDefinition
  A human-readable description of the function.
description() - Method in class uk.me.nxg.unity.UnitDefinition
  Further remarks about this unit, or other comments
dimensions() - Method in class uk.me.nxg.unity.UnitDefinition
  The dimensions of this unit For example, the joule has dimensions ‘L^2 M T^-2’.
Dimensions - Class in uk.me.nxg.unity
  A dimensions specification is a record of the measurement dimensions of a quantity.
Dimensions.BaseQuantity - Enum Class in uk.me.nxg.unity
  The base quantities in the International System of Quantites.
divide(List<OneUnit>, Iterable<OneUnit>) - Static method in class uk.me.nxg.unity.OneUnit
  Divide one list of units by another

## E

equals(Object) - Method in class uk.me.nxg.unity.FunctionDefinition
equals(Object) - Method in class uk.me.nxg.unity.FunctionOfUnit
equals(Object) - Method in class uk.me.nxg.unity.SimpleUnit
  Two units are equal if they have the same power, units and exponent.
equals(Object) - Method in class uk.me.nxg.unity.UnitDefinition
equals(Object) - Method in class uk.me.nxg.unity.UnitExpr
exponent(Dimensions.BaseQuantity) - Method in class uk.me.nxg.unity.Dimensions
  Return the exponent of the given base quantity.
exponents() - Method in class uk.me.nxg.unity.Dimensions
  Deprecated.
  As of v1.1, use `Dimensions.exponent(Dimensions.BaseQuantity)`

## F

fallbackName() - Method in class uk.me.nxg.unity.FunctionDefinition
  A fallback name for the function.
FITS - Enum constant in enum class uk.me.nxg.unity.Syntax
  The syntax for FITS-format strings.
FunctionDefinition - Class in uk.me.nxg.unity
  Describes a ‘known’' function.
FunctionDefinitionMap - Class in uk.me.nxg.unity
  Provides a mapping from function abbreviations to function definitions.
FunctionDefinitionMap() - Constructor for class uk.me.nxg.unity.FunctionDefinitionMap
  Constructs a new function-definition map.
FunctionOfUnit - Class in uk.me.nxg.unity
  Represents a function of a unit, such as `log(m)`.

## G

getAbbreviation() - Method in class uk.me.nxg.unity.UnitRepresentation
  Returns a symbolic abbreviation for this unit in this syntax.
getBaseUnitDefinition() - Method in class uk.me.nxg.unity.FunctionOfUnit
getBaseUnitDefinition() - Method in class uk.me.nxg.unity.OneUnit
  Returns the known base unit.
getBaseUnitDefinition() - Method in class uk.me.nxg.unity.SimpleUnit
getBaseUnitName() - Method in class uk.me.nxg.unity.FunctionOfUnit
getBaseUnitName() - Method in class uk.me.nxg.unity.OneUnit
  Returns the name of this unit.
getBaseUnitName() - Method in class uk.me.nxg.unity.SimpleUnit
getBaseUnitString() - Method in class uk.me.nxg.unity.FunctionOfUnit
getBaseUnitString() - Method in class uk.me.nxg.unity.SimpleUnit
getDimensionlessExpression() - Static method in class uk.me.nxg.unity.UnitExpr
  Return a unit expression representing a dimensionless quantity.
getDimensions() - Method in class uk.me.nxg.unity.FunctionOfUnit
getDimensions() - Method in class uk.me.nxg.unity.OneUnit
  Return the dimensions of the unit, if it is a recognised one.
getDimensions() - Method in class uk.me.nxg.unity.SimpleUnit
getDimensions() - Method in class uk.me.nxg.unity.UnitExpr
  Obtains the dimensions of the complete expression.
getExponent() - Method in class uk.me.nxg.unity.OneUnit
  Obtains the power the unit is raised to.
getFactor() - Method in class uk.me.nxg.unity.UnitExpr
  Obtain the factor multiplying this expression
getFunctionDefinition() - Method in class uk.me.nxg.unity.FunctionOfUnit
  The function which is applied to the operand.
getFunctionName() - Method in class uk.me.nxg.unity.FunctionOfUnit
  The function which is applied to the operand.
getInstance() - Static method in class uk.me.nxg.unity.FunctionDefinitionMap
  Obtain an instance of the function-definition map.
getInstance() - Static method in class uk.me.nxg.unity.UnitDefinitionMap
  Obtain an instance of the unit-definition map.
getLexeme() - Method in class uk.me.nxg.unity.UnitParser
  Return successive lexemes from the input.
getLogFactor() - Method in class uk.me.nxg.unity.UnitExpr
  Obtain the base-10 log of the factor multiplying this expression
getOriginalUnitString() - Method in class uk.me.nxg.unity.FunctionOfUnit
getOriginalUnitString() - Method in class uk.me.nxg.unity.OneUnit
  Obtains the representation of the unit, as it originally appeared in the parsed input.
getOriginalUnitString() - Method in class uk.me.nxg.unity.SimpleUnit
getParsed() - Method in class uk.me.nxg.unity.UnitParser
  Retrieve the parsed result.
getPrefix() - Method in class uk.me.nxg.unity.FunctionOfUnit
getPrefix() - Method in class uk.me.nxg.unity.OneUnit
  Returns the prefix of the unit, as a base-ten log.
getPrefix() - Method in class uk.me.nxg.unity.SimpleUnit
  Returns the prefix of the unit, as a base-ten log.
getRepresentation() - Method in class uk.me.nxg.unity.UnitDefinition
  Return a representation of this unit, from any syntax that knows of one.
getRepresentation(Syntax) - Method in class uk.me.nxg.unity.UnitDefinition
  Return the syntax-specific information about this unit.
getUnit(int) - Method in class uk.me.nxg.unity.UnitExpr
  Get one of the units within the expression, by index.
getUnit(String) - Method in class uk.me.nxg.unity.UnitExpr
  Extracts the unit information from the expression, keyed by a symbolic name for the unit, as defined by the syntax which was used to parse the expression.
getUnit(UnitDefinition) - Method in class uk.me.nxg.unity.FunctionOfUnit
  Returns the unit in the operand which corresponds to the required unit.
getUnit(UnitDefinition) - Method in class uk.me.nxg.unity.UnitExpr
  Extracts the unit information from the expression, keyed by an abstract unit instance.
getURI() - Method in class uk.me.nxg.unity.Dimensions
  Return a URI naming one of the dimensions in the QUDT dimensions ontology.
getURI() - Method in class uk.me.nxg.unity.UnitDefinition
  The Kind of this unit, named by a URI
Grammars supported - Search tag in package uk.me.nxg.unity
  Section
guessUnits - Variable in class uk.me.nxg.unity.UnitParser

## H

hashCode() - Method in class uk.me.nxg.unity.FunctionDefinition
hashCode() - Method in class uk.me.nxg.unity.FunctionOfUnit
hashCode() - Method in class uk.me.nxg.unity.SimpleUnit
hashCode() - Method in class uk.me.nxg.unity.UnitDefinition
hashCode() - Method in class uk.me.nxg.unity.UnitExpr
hasNext() - Method in class uk.me.nxg.unity.UnitRepresentation
  If there is more than one representation for this unit in this syntax, then this will return the next one.

## I

isDeprecated() - Method in class uk.me.nxg.unity.UnitRepresentation
  Indicates whether this syntax deprecates (but still permits) the use of this unit.
isFullyConformant(Syntax) - Method in class uk.me.nxg.unity.UnitExpr
  Indicates whether the expression is fully conformant with the appropriate recommendations.
isKnownParser(String) - Static method in class uk.me.nxg.unity.UnitParser
  Indicates whether the argument is the name of a known parser.
isQuoted() - Method in class uk.me.nxg.unity.OneUnit
  Is this a ‘quoted’ unit?
isReadable() - Method in enum class uk.me.nxg.unity.Syntax
  Indicates whether the syntax is a readable one.
isRecognisedUnit() - Method in class uk.me.nxg.unity.FunctionOfUnit
isRecognisedUnit() - Method in class uk.me.nxg.unity.OneUnit
  Indicates whether the base unit is one of those recognised in any syntax.
isRecognisedUnit() - Method in class uk.me.nxg.unity.SimpleUnit
isRecognisedUnit(Syntax) - Method in class uk.me.nxg.unity.FunctionOfUnit
isRecognisedUnit(Syntax) - Method in class uk.me.nxg.unity.OneUnit
  Indicates whether the base unit is one of those recognised within the specification of the given syntax.
isRecognisedUnit(Syntax) - Method in class uk.me.nxg.unity.SimpleUnit
isRecommendedUnit(Syntax) - Method in class uk.me.nxg.unity.FunctionOfUnit
isRecommendedUnit(Syntax) - Method in class uk.me.nxg.unity.OneUnit
  Indicates whether the base unit is one of those recommended within the specification of the given syntax.
isRecommendedUnit(Syntax) - Method in class uk.me.nxg.unity.SimpleUnit
isWritable() - Method in enum class uk.me.nxg.unity.Syntax
  Indicates whether the syntax is a writable one.
iterator() - Method in class uk.me.nxg.unity.UnitExpr
  Return a representation of the parsed expression as an iterator.

## K

Known units - Search tag in package uk.me.nxg.unity
  Section

## L

label() - Method in class uk.me.nxg.unity.UnitDefinition
  A label for this unit, for example ‘Meter’.
LATEX - Enum constant in enum class uk.me.nxg.unity.Syntax
  The formatter (not parser) for LaTeX/siunitx output.
latexForm() - Method in class uk.me.nxg.unity.FunctionDefinition
  A LaTeX form of the function name.
latexForm() - Method in class uk.me.nxg.unity.UnitDefinition
  A LaTeX version of the unit symbol, if there is one defined
LENGTH - Enum constant in enum class uk.me.nxg.unity.Dimensions.BaseQuantity
lex(String) - Method in class uk.me.nxg.unity.UnitParser
  Prepare to lex a unit string.
lookup(String) - Static method in enum class uk.me.nxg.unity.Syntax
  Look up a syntax enumeration from a string name.
lookupFunctionDefinition(Syntax, String) - Static method in class uk.me.nxg.unity.FunctionDefinitionMap
  Return the FunctionDefinition corresponding to a name, in a particular syntax.
lookupFunctionName(Syntax, FunctionDefinition) - Static method in class uk.me.nxg.unity.FunctionDefinitionMap
  Return the name corresponding to a function definition in a particular syntax.
lookupUnitDefinition(String) - Method in class uk.me.nxg.unity.UnitDefinitionMap
  Obtain information about a unit, keyed by the unit's URI, represented as a string.
lookupUnitDefinition(Syntax, String) - Method in class uk.me.nxg.unity.UnitDefinitionMap
  Obtain unit-definition information for a symbol, as interpreted in a particular syntax.
lookupUnitRepresentation(Syntax, UnitDefinition) - Method in class uk.me.nxg.unity.UnitDefinitionMap
  Obtain information about how a unit is represented in a particular syntax.
LUMINOUSINTENSITY - Enum constant in enum class uk.me.nxg.unity.Dimensions.BaseQuantity

## M

main(String[]) - Static method in class uk.me.nxg.unity.UnitParser
  The library main program, for exploring the library's functionality.
MASS - Enum constant in enum class uk.me.nxg.unity.Dimensions.BaseQuantity
mayHaveBinaryPrefixes() - Method in class uk.me.nxg.unity.UnitRepresentation
  Indicates whether this unit may be used with binary prefixes.
mayHaveSIPrefixes() - Method in class uk.me.nxg.unity.UnitRepresentation
  Indicates whether this unit may be used with SI prefixes.
multiply(Iterable<Dimensions>) - Static method in class uk.me.nxg.unity.Dimensions
  Multiplies several dimensions together, and returns a (new) object representing the dimensions of the result.
multiply(Dimensions) - Method in class uk.me.nxg.unity.Dimensions
  Respond with a Dimensions object which is the result of multiplying the dimensions of this object by the dimensions of another.
multiply(Dimensions, float) - Method in class uk.me.nxg.unity.Dimensions
  Respond with a Dimensions object which is the result of multiplying the dimensions of this object by the dimensions of another raised to the given power.

## N

name() - Method in class uk.me.nxg.unity.FunctionDefinition
  The name of this function, or null.
name() - Method in class uk.me.nxg.unity.UnitDefinition
  The (human-readable) name of this unit, for example ‘Metre’ or ‘Second’
next() - Method in class uk.me.nxg.unity.UnitRepresentation
  Returns true if `hasNext()` would succeed.

## O

OGIP - Enum constant in enum class uk.me.nxg.unity.Syntax
  The syntax for OGIP-format strings.
OneUnit - Class in uk.me.nxg.unity
  A single unit.
OneUnit(float) - Constructor for class uk.me.nxg.unity.OneUnit
OneUnit(float, boolean) - Constructor for class uk.me.nxg.unity.OneUnit
  OneUnit constructor is protected – it should only be invoked by subclass constructors, and they may be invoked from the `OneUnit.Maker` class.

## P

parse(String) - Static method in class uk.me.nxg.unity.Dimensions
  Parse a dimension string to produce a new dimension object.
parse(String) - Method in class uk.me.nxg.unity.UnitParser
  Parse a unit string.
Parsing Units - Search tag in package uk.me.nxg.unity
  Section

## R

reciprocate(Iterable<OneUnit>) - Static method in class uk.me.nxg.unity.OneUnit
  Produce the reciprocal of the unit, which is a unit which has the negative of the exponent of this one.
remove() - Method in class uk.me.nxg.unity.UnitRepresentation

## S

satisfiesUsageConstraints(Syntax) - Method in class uk.me.nxg.unity.FunctionOfUnit
satisfiesUsageConstraints(Syntax) - Method in class uk.me.nxg.unity.OneUnit
  Indicates whether the unit is being used in a way which satisfies any usage constraints.
satisfiesUsageConstraints(Syntax) - Method in class uk.me.nxg.unity.SimpleUnit
setGuessing(boolean) - Method in class uk.me.nxg.unity.UnitParser
  When parsing units, should we try to guess units? By default, we don't guess.
SimpleBinaryUnit - Class in uk.me.nxg.unity
  A unit which has a prefix which is a round power of 1024.
SimpleDecimalUnit - Class in uk.me.nxg.unity
  A unit which has a prefix which is a round power of 1000.
SimpleUnit - Class in uk.me.nxg.unity
  A single simple unit, such as 'kg'.
size() - Method in class uk.me.nxg.unity.UnitExpr
  The number of units in the expression, which will always be at least one, unless the expression represents the dimensionless expression
sortedIterator() - Method in class uk.me.nxg.unity.UnitExpr
  Return a representation of the parsed expression as an iterator, with the units in a canonical order.
Syntax - Enum Class in uk.me.nxg.unity
  An enumeration of the allowed syntaxes within the Unity libary.

## T

TEMPERATURE - Enum constant in enum class uk.me.nxg.unity.Dimensions.BaseQuantity
The CDS grammar - Search tag in package uk.me.nxg.unity
  Section
The FITS grammar - Search tag in package uk.me.nxg.unity
  Section
The lists of known units - Search tag in package uk.me.nxg.unity
  Section
The OGIP grammar - Search tag in package uk.me.nxg.unity
  Section
The VOUnits grammar - Search tag in package uk.me.nxg.unity
  Section
TIME - Enum constant in enum class uk.me.nxg.unity.Dimensions.BaseQuantity
toDebugString() - Method in class uk.me.nxg.unity.FunctionOfUnit
toDebugString() - Method in class uk.me.nxg.unity.OneUnit
  Write out the unit in a testable format.
toDebugString() - Method in class uk.me.nxg.unity.SimpleUnit
toDebugString() - Method in class uk.me.nxg.unity.UnitExpr
  Format the unit expression as a string, in some sort of canonical/unambiguous form.
toDebugString() - Method in class uk.me.nxg.unity.UnitRepresentation
  Produce a slightly more detailed representation of the object's fields.
token - Variable in class uk.me.nxg.unity.UnitParser.Lexeme
toString() - Method in class uk.me.nxg.unity.Dimensions
  Return a string representation of the dimension.
toString() - Method in class uk.me.nxg.unity.FunctionDefinition
  Produces a representation of this function as a string.
toString() - Method in class uk.me.nxg.unity.FunctionOfUnit
toString() - Method in class uk.me.nxg.unity.OneUnit
  Format this unit in readable form.
toString() - Method in class uk.me.nxg.unity.SimpleUnit
toString() - Method in enum class uk.me.nxg.unity.Syntax
  Returns a string version of the syntax name
toString() - Method in class uk.me.nxg.unity.UnitDefinition
  Produces a representation of this unit as a string, combining the name of the unit and a URI referring to it unambiguously.
toString() - Method in class uk.me.nxg.unity.UnitExpr
  Produces a string representation of the unit expression, in a form suitable for display
toString() - Method in class uk.me.nxg.unity.UnitParser.Lexeme
toString() - Method in class uk.me.nxg.unity.UnitRepresentation
  Produce a compact string representation of the unit.
toString(Syntax) - Method in class uk.me.nxg.unity.FunctionOfUnit
toString(Syntax) - Method in class uk.me.nxg.unity.OneUnit
  Format this unit in readable form, appropriate to the given syntax.
toString(Syntax) - Method in class uk.me.nxg.unity.SimpleUnit
toString(Syntax) - Method in class uk.me.nxg.unity.UnitExpr
  Produces a string representation of the unit expression, in a format appropriate to the given syntax.
toString(Syntax, Locale) - Method in class uk.me.nxg.unity.UnitExpr
  Produces a string representation of the unit expression, in a format appropriate to the given syntax, and with output respecting the conventions of the given locale.
type() - Method in class uk.me.nxg.unity.UnitDefinition
  A label for the type of this unit, as a QUDT (or similar) ‘quantity’ URI.

## U

uk.me.nxg.unity - package uk.me.nxg.unity
  The Unity package provides a parser for unit strings.
UnitDefinition - Class in uk.me.nxg.unity
  Describes a unit.
UnitDefinitionMap - Class in uk.me.nxg.unity
  Provides a mapping from unit abbreviations to unit definitions.
UnitDefinitionMap() - Constructor for class uk.me.nxg.unity.UnitDefinitionMap
  Constructs a new unit-definition map.
UnitExpr - Class in uk.me.nxg.unity
  A parsed unit expression.
UnitParser - Class in uk.me.nxg.unity
  A parser for unit strings.
UnitParser(Syntax) - Constructor for class uk.me.nxg.unity.UnitParser
  Create a new unit parser.
UnitParser(Syntax, String) - Constructor for class uk.me.nxg.unity.UnitParser
  Create a new unit parser and parse a unit string.
UnitParser.Lexeme - Class in uk.me.nxg.unity
  A single lexeme.
UnitParserException - Exception Class in uk.me.nxg.unity
  Thrown when an expression cannot be parsed.
UnitRepresentation - Class in uk.me.nxg.unity
  A description of the way that a unit is represented in a particular syntax.
unitString() - Method in class uk.me.nxg.unity.SimpleUnit
  Obtains the string form of the unit, including prefix, with a default syntax.
unitString(Syntax) - Method in class uk.me.nxg.unity.FunctionOfUnit
unitString(Syntax) - Method in class uk.me.nxg.unity.OneUnit
  Obtains the string representation of the unit, including prefix, in the given syntax.
unitString(Syntax) - Method in class uk.me.nxg.unity.SimpleUnit
unity() - Static method in class uk.me.nxg.unity.Dimensions
  Returns a new Dimensions object representing 1.
UnwritableExpression - Exception Class in uk.me.nxg.unity
  Thrown when an expression cannot be written in a particular syntax.

## V

value - Variable in class uk.me.nxg.unity.UnitParser.Lexeme
valueOf(String) - Static method in enum class uk.me.nxg.unity.Dimensions.BaseQuantity
  Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class uk.me.nxg.unity.Syntax
  Returns the enum constant of this class with the specified name.
values() - Static method in enum class uk.me.nxg.unity.Dimensions.BaseQuantity
  Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class uk.me.nxg.unity.Syntax
  Returns an array containing the constants of this enum class, in the order they are declared.
Version - Class in uk.me.nxg.unity
  Manage version information
versionInteger() - Static method in class uk.me.nxg.unity.Version
  Indicate the package version, as an integer.
versionString() - Static method in class uk.me.nxg.unity.Version
  Indicate the package version, as a printable string giving the package name and version
VOUNITS - Enum constant in enum class uk.me.nxg.unity.Syntax
  The syntax for VOUnit-format strings.

## W

wasGuessed() - Method in class uk.me.nxg.unity.OneUnit
  Return true if this unit was guessed.
wasGuessed() - Method in class uk.me.nxg.unity.SimpleDecimalUnit

A C D E F G H I K L M N O P R S T U V W
All Classes and Interfaces|All Packages|Serialized Form