| javax.measure.unit.AlternateUnit
AlternateUnit | final public class AlternateUnit extends DerivedUnit (Code) | | This class represents the units used in expressions to distinguish
between quantities of a different nature but of the same dimensions.
Instances of this class are created through the
Unit.alternate(String) method.
author: Jean-Marie Dautelle version: 4.2, August 26, 2007 |
Constructor Summary | |
| AlternateUnit(String symbol, Unit> parent) Creates an alternate unit for the specified unit identified by the
specified symbol. |
Method Summary | |
public boolean | equals(Object that) Indicates if this alternate unit is considered equals to the specified
object (both are alternate units with equal symbol, equal base units
and equal converter to base units).
Parameters: that - the object to compare for equality. | final public Unit<? super Q> | getParent() Returns the parent unit from which this alternate unit is derived
(a system unit itself). | final public Unit<? super Q> | getStandardUnit() | final public String | getSymbol() Returns the symbol for this alternate unit. | public int | hashCode() | final public UnitConverter | toStandardUnit() |
AlternateUnit | AlternateUnit(String symbol, Unit> parent)(Code) | | Creates an alternate unit for the specified unit identified by the
specified symbol.
Parameters: symbol - the symbol for this alternate unit. Parameters: parent - the system unit from which this alternate unit isderived. throws: UnsupportedOperationException - if the source is not a standard unit. throws: IllegalArgumentException - if the specified symbol is associated to a different unit. |
equals | public boolean equals(Object that)(Code) | | Indicates if this alternate unit is considered equals to the specified
object (both are alternate units with equal symbol, equal base units
and equal converter to base units).
Parameters: that - the object to compare for equality. true if this and that are considered equals; false otherwise. |
getParent | final public Unit<? super Q> getParent()(Code) | | Returns the parent unit from which this alternate unit is derived
(a system unit itself).
the parent of the alternate unit. |
getStandardUnit | final public Unit<? super Q> getStandardUnit()(Code) | | |
getSymbol | final public String getSymbol()(Code) | | Returns the symbol for this alternate unit.
this alternate unit symbol. |
hashCode | public int hashCode()(Code) | | |
|
|