Package ucar.units
Class UnitID
- java.lang.Object
-
- ucar.units.UnitID
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
UnitName
,UnitSymbol
public abstract class UnitID extends Object implements Serializable
Provides support for unit identifiers.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnitID()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
getName()
Returns the name of the unit.abstract String
getPlural()
Returns the plural form of the name of the unit.abstract String
getSymbol()
Returns the symbol for the unit.static UnitID
newUnitID(String name, String plural, String symbol)
Factory method for constructing an identifier from a name, plural, and symbol.abstract String
toString()
Returns the string representation of this identifier.
-
-
-
Method Detail
-
newUnitID
public static UnitID newUnitID(String name, String plural, String symbol)
Factory method for constructing an identifier from a name, plural, and symbol.- Parameters:
name
- The name for the unit. May benull
.plural
- The plural form of the name. Ifnull
andname
is non-null
, then regular plural-forming rules are used on the name.symbol
- The symbol for the unit. May benull
.
-
getName
public abstract String getName()
Returns the name of the unit.- Returns:
- The name of the unit. May be
null
.
-
getPlural
public abstract String getPlural()
Returns the plural form of the name of the unit.- Returns:
- The plural form of the name of the unit. May be
null
.
-
getSymbol
public abstract String getSymbol()
Returns the symbol for the unit.- Returns:
- The symbol for the unit. May be
null
.
-
-