Package ucar.units

Class QuantityDimension


  • @Immutable
    public final class QuantityDimension
    extends Dimension
    Provides support for the dimension of a quantity. For example, the dimension of the quantity "force" is "M.L.t-2".
    • Constructor Detail

      • QuantityDimension

        public QuantityDimension()
        Constructs from nothing. Constructs a dimensionless dimension.
      • QuantityDimension

        public QuantityDimension​(BaseQuantity baseQuantity)
        Constructs from a base quantity.
        Parameters:
        baseQuantity - The base quantity constituting the dimension.
      • QuantityDimension

        protected QuantityDimension​(Factor[] factors)
        Constructs from an array of Factor-s. This is a trusted constructor for use by subclasses only.
        Parameters:
        factors - The Factor-s constituting the dimension.
    • Method Detail

      • multiplyBy

        public QuantityDimension multiplyBy​(QuantityDimension that)
        Multiplies this quantity dimension by another quantity dimension.
        Parameters:
        that - The other quantity dimension.
        Returns:
        The product of this quantity dimension with the other quantity dimension.
      • divideBy

        public QuantityDimension divideBy​(QuantityDimension that)
        Divides this quantity dimension by another quantity dimension.
        Parameters:
        that - The quantity dimension to divide this quantity dimension by.
        Returns:
        The quotient of this quantity dimension and the other quantity dimension.
      • raiseTo

        public QuantityDimension raiseTo​(int power)
        Raises this quantity dimension to a power.
        Parameters:
        power - The power to raise this quantity dimension by.
        Returns:
        The result of raising this quantity dimension to the power power.