Package noaa.coastwatch.util
Class UnitFactory
java.lang.Object
noaa.coastwatch.util.UnitFactory
The
UnitFactory
class creates 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.- Since:
- 3.2.0
- Author:
- Peter Hollemans
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
UnitFactory
public UnitFactory()
-
-
Method Details
-
create
Creates a unit based on a unit specifier string.- Parameters:
unitSpec
- the unit specifier string.- Returns:
- the new unit.
- Throws:
IllegalArgumentException
- if the unit specifier does not resolve to a valid unit.
-