Package ucar.units

Class UnitDimension


  • @Immutable
    public final class UnitDimension
    extends Dimension
    • 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.