Class MixedRadix<Q extends javax.measure.Quantity<Q>>

    • Method Detail

      • of

        public static <X extends javax.measure.Quantity<X>> MixedRadix<X> of​(javax.measure.Unit<X> leadingUnit)
      • of

        @SafeVarargs
        public static <X extends javax.measure.Quantity<X>> MixedRadix<X> of​(javax.measure.Unit<X>... units)
      • of

        public static <X extends javax.measure.Quantity<X>> MixedRadix<X> of​(Collection<javax.measure.Unit<X>> units)
      • ofPrimary

        public static <X extends javax.measure.Quantity<X>> MixedRadix<X> ofPrimary​(javax.measure.Unit<X> primaryUnit)
      • createQuantity

        public javax.measure.Quantity<Q> createQuantity​(Number[] values,
                                                        javax.measure.Quantity.Scale scale)
        Creates a Quantity from given values and scale.
        Parameters:
        values - - numbers corresponding to the radices in most significant first order, allowed to be of shorter length than the total count of radices of this MixedRadix instance
        scale - - the Quantity.Scale to be used for the returned Quantity
      • createCompoundQuantity

        public CompoundQuantity<Q> createCompoundQuantity​(Number[] values,
                                                          javax.measure.Quantity.Scale scale)
        Creates a CompoundQuantity from given values and scale.

        Note: Not every CompoundQuantity can be represented by a MixedRadix. MixedRadix strictly requires its coefficients to be in decreasing order of significance, while a CompoundQuantity in principle does not.

        Parameters:
        values - - numbers corresponding to the radix coefficients in most significant first order, allowed to be of shorter length than the total count of radix coefficients of this MixedRadix instance
        scale - - the Quantity.Scale to be used for the elements of the returned CompoundQuantity