Package com.ibm.fhir.search.location.uom
Class UOMManager
- java.lang.Object
-
- com.ibm.fhir.search.location.uom.UOMManager
-
public final class UOMManager extends 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 Double
convertUnitsToKiloMeters(String unit, double value)
Method to convert unit into kilometersstatic Double
convertUnitsToMeters(String unit, double value)
Method to convert unit into metersstatic Double
getUnitToMetersFactor(String unit)
based on the unit abbreviation, returns the factor
-
-
-
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
-
-