Package com.ibm.icu.impl.number
Class UnitConversionHandler
java.lang.Object
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.)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ComplexUnitsConverter
private MeasureUnit
private final MicroPropsGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprocessQuantity
(DecimalQuantity quantity) Obtains the appropriate output values from the Unit Converter.
-
Field Details
-
fParent
-
fOutputUnit
-
fComplexUnitConverter
-
-
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:
processQuantity
in interfaceMicroPropsGenerator
- Parameters:
quantity
- The quantity for consideration and optional mutation.- Returns:
- A MicroProps instance resolved for the quantity.
-