Top Description Fields Constructors Methods
com.ibm.icu.impl.number

public Class UnitConversionHandler

extends Object
implements MicroPropsGenerator
Class Inheritance
All Implemented Interfaces
com.ibm.icu.impl.number.MicroPropsGenerator
Imports
com.ibm.icu.impl.units.ComplexUnitsConverter, .ConversionRates, .MeasureUnitImpl, com.ibm.icu.util.MeasureUnit

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

Modifier and TypeField and Description
private ComplexUnitsConverter
private MeasureUnit
private final MicroPropsGenerator

Constructor Summary

AccessConstructor and Description
public
UnitConversionHandler(MeasureUnit
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.
targetUnit
,
MicroPropsGenerator
The parent MicroPropsGenerator.
parent
)

Method Summary

Modifier and TypeMethod and Description
public MicroProps
processQuantity(DecimalQuantity
The quantity for consideration and optional mutation.
quantity
)

Implements com.ibm.icu.impl.number.MicroPropsGenerator.processQuantity.

Deprecated as a consequence of DecimalQuantity being deprecated.
Obtains the appropriate output values from the Unit Converter.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fComplexUnitConverterback to summary
private ComplexUnitsConverter fComplexUnitConverter
fOutputUnitback to summary
private MeasureUnit fOutputUnit
fParentback to summary
private final MicroPropsGenerator fParent

Constructor Detail

UnitConversionHandlerback to summary
public UnitConversionHandler(MeasureUnit targetUnit, MicroPropsGenerator parent)
Parameters
targetUnit:MeasureUnit

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:MicroPropsGenerator

The parent MicroPropsGenerator.

Method Detail

processQuantityback to summary
public MicroProps processQuantity(DecimalQuantity quantity)

Implements com.ibm.icu.impl.number.MicroPropsGenerator.processQuantity.

Deprecated

as a consequence of DecimalQuantity being deprecated. See corresponding docs for further information.

Obtains the appropriate output values from the Unit Converter.

Parameters
quantity:DecimalQuantity

Doc from com.ibm.icu.impl.number.MicroPropsGenerator.processQuantity.

The quantity for consideration and optional mutation.

Returns:MicroProps

Doc from com.ibm.icu.impl.number.MicroPropsGenerator.processQuantity.

A MicroProps instance resolved for the quantity.

Annotations
@Override