ucar.units
Class UnitSymbol

java.lang.Object
  extended by ucar.units.UnitID
      extended by ucar.units.UnitSymbol
All Implemented Interfaces:
Serializable

public final class UnitSymbol
extends UnitID

Provides support for symbols for units.

Version:
$Id: UnitSymbol.java 64 2006-07-12 22:30:50Z edavis $
Author:
Steven R. Emmerson
See Also:
Serialized Form

Constructor Summary
UnitSymbol(String symbol)
          Constructs from a symbol.
 
Method Summary
 String getName()
          Returns the name of the unit.
 String getPlural()
          Returns the plural form of the name of the unit.
 String getSymbol()
          Returns the symbol for the unit.
 String toString()
          Returns the string representation of this identifier.
 
Methods inherited from class ucar.units.UnitID
newUnitID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnitSymbol

public UnitSymbol(String symbol)
           throws NameException
Constructs from a symbol.

Parameters:
symbol - The symbol for the unit. Shall not be null.
Throws:
NameException
Method Detail

getName

public String getName()
Returns the name of the unit. Always returns null.

Specified by:
getName in class UnitID
Returns:
null.

getPlural

public String getPlural()
Returns the plural form of the name of the unit. Always returns null.

Specified by:
getPlural in class UnitID
Returns:
null.

getSymbol

public String getSymbol()
Returns the symbol for the unit.

Specified by:
getSymbol in class UnitID
Returns:
The symbol for the unit. Never null .

toString

public String toString()
Returns the string representation of this identifier.

Specified by:
toString in class UnitID
Returns:
The string representation of this identifier.


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.