public class UnitResolver extends Object
| Modifier and Type | Method and Description |
|---|---|
static UnitResolver |
instance() |
static ucar.units.Unit |
parseUnit(String unitString) |
static ucar.units.Unit |
parseUnit(String unitString,
String symbol) |
static ucar.units.Unit |
parseUnit(String unitString,
String name,
String symbol) |
static ucar.units.Unit |
parseUnit(String unitString,
String name,
String plural,
String symbol)
Parse a unit string using the StandardUnitFormat, but also manually set the name and optionally plural name and symbol.
|
ucar.units.Unit |
resolveUnit(String unitString)
Resolves a string to a ucar.units.Unit.
|
public static UnitResolver instance() throws UnitCreationException
UnitCreationExceptionpublic ucar.units.Unit resolveUnit(String unitString) throws UnitCreationException
unit - UnitCreationExceptionpublic static ucar.units.Unit parseUnit(String unitString) throws UnitCreationException
UnitCreationExceptionpublic static ucar.units.Unit parseUnit(String unitString, String symbol) throws UnitCreationException
UnitCreationExceptionpublic static ucar.units.Unit parseUnit(String unitString, String name, String symbol) throws UnitCreationException
UnitCreationExceptionpublic static ucar.units.Unit parseUnit(String unitString, String name, String plural, String symbol) throws UnitCreationException
unitString - Unit string to parsename - Unit's nameplural - Unit's plural namesymbol - Unit's symbolUnitCreationExceptionCopyright © 2016. All Rights Reserved.