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