Class UOMManager


  • public final class UOMManager
    extends Object
    LocationUnit maps the unit of measure to a specific length (one meter).
    • Method Detail

      • getUnitToMetersFactor

        public static final Double getUnitToMetersFactor​(String unit)
        based on the unit abbreviation, returns the factor
        Parameters:
        unit - the string representing the unit-of-measure abbreviation.
        Returns:
        the factor if the factor exists, else null.
      • convertUnitsToMeters

        public static Double convertUnitsToMeters​(String unit,
                                                  double value)
        Method to convert unit into meters
        Parameters:
        unit -
        miles - distance in miles
        Returns:
        distance in kilometers
      • convertUnitsToKiloMeters

        public static Double convertUnitsToKiloMeters​(String unit,
                                                      double value)
        Method to convert unit into kilometers
        Parameters:
        unit -
        miles - distance in miles
        Returns:
        distance in kilometers