|
JScience v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.physics.units.Unit<Q>
org.jscience.physics.units.DerivedUnit<Q>
org.jscience.physics.units.CompoundUnit<Q>
public class CompoundUnit<Q extends Quantity>
This class represents a compound unit. Compound units are used
to express quantites using multi-radix units. Instances of this
class are created using the Unit.compound(org.jscience.physics.units.Unit method.
For example:)
Unit HOUR_MINUTE_SECOND
= NonSI.HOUR.compound(NonSI.MINUTE).compound(SI.SECOND);
Unit.compound(org.jscience.physics.units.Unit)
,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.jscience.physics.units.Unit |
|---|
ONE |
| Constructor Summary | |
|---|---|
protected |
CompoundUnit(Unit<Q> mainUnit,
Unit<Q> subUnit)
Creates a compound unit |
| Method Summary | |
|---|---|
protected boolean |
equalsImpl(java.lang.Object that)
Indicates if the specified unit can be considered equals to the one specified (for unicity purpose). |
Unit<Q> |
getMainUnit()
Returns the main unit of this compound unit. |
protected Unit<? super Q> |
getParentUnitImpl()
Returns the parent units this unit is derived from. |
Unit<Q> |
getSubUnit()
Returns the sub-unit of this compound unit. |
protected int |
hashCodeImpl()
Returns the hash code for this unit (calculated only once as units are unique). |
protected Converter |
toParentUnitImpl()
Returns the converter to the parent unit. |
| Methods inherited from class org.jscience.physics.units.Unit |
|---|
alias, alternate, compound, divide, equals, getBaseUnits, getConverterTo, getDimension, getInstance, getInstances, getParentUnit, hashCode, inverse, isCompatible, label, plus, pow, readResolve, root, times, times, toBaseUnits, toParentUnit, toString, toText, transform, valueOf |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected CompoundUnit(Unit<Q> mainUnit,
Unit<Q> subUnit)
mainUnit - the main unit.subUnit - the sub-unit.| Method Detail |
|---|
public Unit<Q> getMainUnit()
public Unit<Q> getSubUnit()
protected boolean equalsImpl(java.lang.Object that)
Unit
equalsImpl in class Unit<Q extends Quantity>true if this unit is considered equal to
that unit; false otherwise.protected int hashCodeImpl()
Unit
hashCodeImpl in class Unit<Q extends Quantity>protected Unit<? super Q> getParentUnitImpl()
Unit
getParentUnitImpl in class Unit<Q extends Quantity>this if this unit is
a base unit or a product of base units.protected Converter toParentUnitImpl()
Unit
toParentUnitImpl in class Unit<Q extends Quantity>Unit.getParentUnitImpl()
|
JScience v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||