Package ucar.units
Class UnitDimension
- java.lang.Object
-
- ucar.units.Dimension
-
- ucar.units.UnitDimension
-
@Immutable public final class UnitDimension extends Dimension
-
-
Constructor Summary
Constructors Constructor Description UnitDimension()
Constructs a dimensionless unit dimension.UnitDimension(BaseUnit baseUnit)
Constructs the unit dimension corresponding to a base unit.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnitDimension
divideBy(UnitDimension that)
Divides this unit dimension by another.QuantityDimension
getQuantityDimension()
Returns the corresponding quantity dimension.UnitDimension
multiplyBy(UnitDimension that)
Multiplies this unit dimension by another.UnitDimension
raiseTo(int power)
Raises this unit dimension to a power.-
Methods inherited from class ucar.units.Dimension
equals, getFactors, getRank, hashCode, isDimensionless, isReciprocalOf, mult, pow, toString
-
-
-
-
Constructor Detail
-
UnitDimension
public UnitDimension()
Constructs a dimensionless unit dimension.
-
UnitDimension
public UnitDimension(BaseUnit baseUnit)
Constructs the unit dimension corresponding to a base unit.- Parameters:
baseUnit
- A base unit.
-
-
Method Detail
-
multiplyBy
public UnitDimension multiplyBy(UnitDimension that)
Multiplies this unit dimension by another.- Parameters:
that
- The other unit dimension.- Returns:
- The product of this unit dimension multiplied by the other.
-
divideBy
public UnitDimension divideBy(UnitDimension that)
Divides this unit dimension by another.- Parameters:
that
- The other unit dimension.- Returns:
- The quotient of this unit dimension divided by the other.
-
raiseTo
public UnitDimension raiseTo(int power)
Raises this unit dimension to a power.- Parameters:
power
- The power.- Returns:
- The result of raising this unit dimension to the power.
-
getQuantityDimension
public QuantityDimension getQuantityDimension()
Returns the corresponding quantity dimension.- Returns:
- The quantity dimension corresponding to this unit dimension.
-
-