JADE v6.1

javax.units
Class AlternateUnit

java.lang.Object
  extended byjavax.units.Unit
      extended byjavax.units.DerivedUnit
          extended byjavax.units.AlternateUnit
All Implemented Interfaces:
java.io.Serializable

public final class AlternateUnit
extends DerivedUnit

This class represents an alternate unit. Alternate units are used in expressions to distinguish between quantities of a different nature but of the same dimensions (e.g. angle rad, angular acceleration rad/s²).

Instances of this class are created using the Unit.alternate(java.lang.String) method.

Version:
4.0, January 30, 2003
Author:
Jean-Marie Dautelle
See Also:
Unit.alternate(java.lang.String), Serialized Form

Field Summary
 
Fields inherited from class javax.units.Unit
ONE
 
Method Summary
 boolean equals(java.lang.Object that)
          Indicates if this unit is equal to the object specified.
 java.lang.String getSymbol()
          Returns the symbol for this alternate unit.
 Unit getSystemUnit()
          Returns the system unit for this unit.
 
Methods inherited from class javax.units.Unit
add, alternate, appendTo, divide, getConverterTo, getDimension, getInstance, getInstances, hashCode, isCompatible, isSystemUnit, multiply, multiply, pow, readResolve, root, searchSymbol, toString, valueOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getSymbol

public final java.lang.String getSymbol()
Returns the symbol for this alternate unit.

Returns:
this alternate unit's symbol.

getSystemUnit

public Unit getSystemUnit()
Description copied from class: Unit
Returns the system unit for this unit. The system unit identifies the nature of the quantity being measured using this unit.

Note: Having the same system units is not sufficient to ensure that a converter exists between the two units (e.g. °C/m and K/m).

Specified by:
getSystemUnit in class Unit
Returns:
the system unit for this unit.
See Also:
Unit.isSystemUnit()

equals

public boolean equals(java.lang.Object that)
Description copied from class: Unit
Indicates if this unit is equal to the object specified. Units are unique and immutable, therefore users might want to use == to test for equality.

Specified by:
equals in class Unit
Parameters:
that - the object to compare for equality.
Returns:
true if this unit and the specified object are considered equal; false otherwise.

JADE v6.1

Copyright © 2004 Jean-Marie Dautelle.