@Immutable public final class UnitDimension extends Dimension
Constructor and Description |
---|
UnitDimension()
Constructs a dimensionless unit dimension.
|
UnitDimension(BaseUnit baseUnit)
Constructs the unit dimension corresponding to a base unit.
|
Modifier and Type | Method and Description |
---|---|
UnitDimension |
divideBy(UnitDimension that)
Divides this unit dimension by another.
|
QuantityDimension |
getQuantityDimension()
Returns the corresponding quantity dimension.
|
static void |
main(java.lang.String[] args)
Tests this class.
|
UnitDimension |
multiplyBy(UnitDimension that)
Multiplies this unit dimension by another.
|
UnitDimension |
raiseTo(int power)
Raises this unit dimension to a power.
|
equals, getFactors, getRank, hashCode, isDimensionless, isReciprocalOf, mult, pow, toString
public UnitDimension()
public UnitDimension(BaseUnit baseUnit)
baseUnit
- A base unit.public UnitDimension multiplyBy(UnitDimension that)
that
- The other unit dimension.public UnitDimension divideBy(UnitDimension that)
that
- The other unit dimension.public UnitDimension raiseTo(int power)
power
- The power.public QuantityDimension getQuantityDimension()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception