public class MixedUnitLongNameHandler extends Object implements MicroPropsGenerator, ModifierStore, LongNameMultiplexer.ParentlessMicroPropsGenerator
| Modifier and Type | Method and Description |
|---|---|
static MixedUnitLongNameHandler |
forMeasureUnit(ULocale locale,
MeasureUnit mixedUnit,
NumberFormatter.UnitWidth width,
String unitDisplayCase,
PluralRules rules,
MicroPropsGenerator parent)
Construct a localized MixedUnitLongNameHandler for the specified
MeasureUnit.
|
Modifier |
getModifier(Modifier.Signum signum,
StandardPlural plural)
Required for ModifierStore.
|
MicroProps |
processQuantity(DecimalQuantity quantity)
Produces a plural-appropriate Modifier for a mixed unit: `quantity` is
taken as the final smallest unit, while the larger unit values must be
provided by `micros.mixedMeasures`, micros being the MicroProps instance
returned by the parent.
|
MicroProps |
processQuantityWithMicros(DecimalQuantity quantity,
MicroProps micros)
Produces a plural-appropriate Modifier for a mixed unit: `quantity` is
taken as the final smallest unit, while the larger unit values must be
provided via `micros.mixedMeasures`.
|
public static MixedUnitLongNameHandler forMeasureUnit(ULocale locale, MeasureUnit mixedUnit, NumberFormatter.UnitWidth width, String unitDisplayCase, PluralRules rules, MicroPropsGenerator parent)
locale - The desired locale.mixedUnit - The mixed measure unit to construct a
MixedUnitLongNameHandler for.width - Specifies the desired unit rendering.unitDisplayCase - Specifies the desired grammatical case. If the
specified case is not found, we fall back to nominative or no-case.rules - PluralRules instance.parent - MicroPropsGenerator instance.public MicroProps processQuantity(DecimalQuantity quantity)
processQuantity in interface MicroPropsGeneratorquantity - The quantity for consideration and optional mutation.public MicroProps processQuantityWithMicros(DecimalQuantity quantity, MicroProps micros)
processQuantityWithMicros in interface LongNameMultiplexer.ParentlessMicroPropsGeneratorpublic Modifier getModifier(Modifier.Signum signum, StandardPlural plural)
getModifier in interface ModifierStore