public class UnitFactory
extends java.lang.Object
UnitFactory
class create Unidata UDUNITS style
Unit
objects from unit specification strings. This is
simply a convenience factory that uses the ucar.units
package. A number of aliases are also added to the parser to
handle legacy CoastWatch unit specifications.Constructor and Description |
---|
UnitFactory() |
Modifier and Type | Method and Description |
---|---|
static ucar.units.Unit |
create(java.lang.String unitSpec)
Creates a unit based on a unit specifier string.
|
public static ucar.units.Unit create(java.lang.String unitSpec)
unitSpec
- the unit specifier string.java.lang.IllegalArgumentException
- if the unit specifier does not
resolve to a valid unit.