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

public Class UsagePrefsHandler

extends Object
implements MicroPropsGenerator
Class Inheritance
All Implemented Interfaces
com.ibm.icu.impl.number.MicroPropsGenerator
Imports
java.math.BigDecimal, java.util.List, com.ibm.icu.impl.units.ComplexUnitsConverter, .MeasureUnitImpl, .UnitsRouter, com.ibm.icu.util.MeasureUnit, .ULocale

Field Summary

Modifier and TypeField and Description
private final MicroPropsGenerator
private UnitsRouter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<MeasureUnit>
getOutputUnits()

Returns the list of possible output units, i.e. the full set of preferences, for the localized, usage-specific unit preferences.

protected static void
mixedMeasuresToMicros(ComplexUnitsConverter.ComplexConverterResult complexConverterResult, DecimalQuantity quantity, MicroProps outMicros)

Deprecated as a consequence of DecimalQuantity being deprecated.
Populates micros.mixedMeasures and modifies quantity, based on the values in measures.
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 value, MeasureUnit and rounding/precision behaviour from the UnitsRouter.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fParentback to summary
private final MicroPropsGenerator fParent
fUnitsRouterback to summary
private UnitsRouter fUnitsRouter

Constructor Detail

UsagePrefsHandlerback to summary
public UsagePrefsHandler(ULocale locale, MeasureUnit inputUnit, String usage, MicroPropsGenerator parent)

Method Detail

getOutputUnitsback to summary
public List<MeasureUnit> getOutputUnits()

Returns the list of possible output units, i.e. the full set of preferences, for the localized, usage-specific unit preferences.

The returned pointer should be valid for the lifetime of the UsagePrefsHandler instance.

mixedMeasuresToMicrosback to summary
protected static void mixedMeasuresToMicros(ComplexUnitsConverter.ComplexConverterResult complexConverterResult, DecimalQuantity quantity, MicroProps outMicros)

Deprecated

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

Populates micros.mixedMeasures and modifies quantity, based on the values in measures.

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 value, MeasureUnit and rounding/precision behaviour from the UnitsRouter.

The output unit is passed on to the LongNameHandler via micros.outputUnit.

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