Class UOMManager


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Double convertUnitsToKiloMeters​(java.lang.String unit, double value)
      Method to convert unit into kilometers
      static java.lang.Double convertUnitsToMeters​(java.lang.String unit, double value)
      Method to convert unit into meters
      static java.lang.Double getUnitToMetersFactor​(java.lang.String unit)
      based on the unit abbreviation, returns the factor
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getUnitToMetersFactor

        public static final java.lang.Double getUnitToMetersFactor​(java.lang.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 java.lang.Double convertUnitsToMeters​(java.lang.String unit,
                                                            double value)
        Method to convert unit into meters
        Parameters:
        unit -
        miles - distance in miles
        Returns:
        distance in kilometers
      • convertUnitsToKiloMeters

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