Class AbstractLinearUnitTest<U extends Unit<U>>

    • Constructor Detail

      • AbstractLinearUnitTest

        public AbstractLinearUnitTest()
    • Method Detail

      • checkUnitRatioNameAndAbbreviation

        protected final void checkUnitRatioNameAndAbbreviation​(U u,
                                                               double expectedRatio,
                                                               double precision,
                                                               String expectedName,
                                                               String expectedAbbreviation)
        Verify one length conversion factor to standard unit and the localization of the name and abbreviation.
        Parameters:
        u - Unit to check
        expectedRatio - Double; expected ratio
        precision - Double; precision of verification
        expectedName - String; expected name in the resources
        expectedAbbreviation - String; expected abbreviation in the resources
      • getMultiplicationFactorTo

        public final double getMultiplicationFactorTo​(U fromUnit,
                                                      U toUnit)
        Parameters:
        fromUnit - U; the unit to convert from
        toUnit - U; the unit to convert to
        Returns:
        multiplication factor to convert a value from fromUnit to toUnit