Class UnitConversionHandler
java.lang.Object
org.graalvm.shadowed.com.ibm.icu.impl.number.UnitConversionHandler
- All Implemented Interfaces:
MicroPropsGenerator
A MicroPropsGenerator which converts a measurement from one MeasureUnit to
another. In particular, the output MeasureUnit may be a mixed unit. (The
input unit may not be a mixed unit.)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprocessQuantity(DecimalQuantity quantity) Obtains the appropriate output values from the Unit Converter.
-
Constructor Details
-
UnitConversionHandler
- Parameters:
targetUnit- Specifies the output MeasureUnit. The input MeasureUnit is derived from it: in case of a mixed unit, the biggest unit is taken as the input unit. If not a mixed unit, the input unit will be the same as the output unit and no unit conversion takes place.parent- The parent MicroPropsGenerator.
-
-
Method Details
-
processQuantity
Obtains the appropriate output values from the Unit Converter.- Specified by:
processQuantityin interfaceMicroPropsGenerator- Parameters:
quantity- The quantity for consideration and optional mutation.- Returns:
- A MicroProps instance resolved for the quantity.
-