Package com.ibm.icu.impl.number
Class LongNameMultiplexer
- java.lang.Object
-
- com.ibm.icu.impl.number.LongNameMultiplexer
-
- All Implemented Interfaces:
MicroPropsGenerator
public class LongNameMultiplexer extends java.lang.Object implements MicroPropsGenerator
A MicroPropsGenerator that multiplexes between different LongNameHandlers, depending on the outputUnit. See processQuantity() for the input requirements.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LongNameMultiplexer.ParentlessMicroPropsGenerator
LongNameMultiplexer calls the parent MicroPropsGenerator itself, receiving the MicroProps instance in use for this formatting pipeline.
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<LongNameMultiplexer.ParentlessMicroPropsGenerator>
fHandlers
private java.util.List<MeasureUnit>
fMeasureUnits
private MicroPropsGenerator
fParent
-
Constructor Summary
Constructors Constructor Description LongNameMultiplexer(MicroPropsGenerator fParent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LongNameMultiplexer
forMeasureUnits(ULocale locale, java.util.List<MeasureUnit> units, NumberFormatter.UnitWidth width, java.lang.String unitDisplayCase, PluralRules rules, MicroPropsGenerator parent)
MicroProps
processQuantity(DecimalQuantity quantity)
Considers the givenDecimalQuantity
, optionally mutates it, and returns aMicroProps
.
-
-
-
Field Detail
-
fParent
private final MicroPropsGenerator fParent
-
fHandlers
private java.util.List<LongNameMultiplexer.ParentlessMicroPropsGenerator> fHandlers
-
fMeasureUnits
private java.util.List<MeasureUnit> fMeasureUnits
-
-
Constructor Detail
-
LongNameMultiplexer
public LongNameMultiplexer(MicroPropsGenerator fParent)
-
-
Method Detail
-
forMeasureUnits
public static LongNameMultiplexer forMeasureUnits(ULocale locale, java.util.List<MeasureUnit> units, NumberFormatter.UnitWidth width, java.lang.String unitDisplayCase, PluralRules rules, MicroPropsGenerator parent)
-
processQuantity
public MicroProps processQuantity(DecimalQuantity quantity)
Description copied from interface:MicroPropsGenerator
Considers the givenDecimalQuantity
, optionally mutates it, and returns aMicroProps
.- Specified by:
processQuantity
in interfaceMicroPropsGenerator
- Parameters:
quantity
- The quantity for consideration and optional mutation.- Returns:
- A MicroProps instance resolved for the quantity.
-
-