Class UsagePrefsHandler

java.lang.Object
com.ibm.icu.impl.number.UsagePrefsHandler
All Implemented Interfaces:
MicroPropsGenerator

public class UsagePrefsHandler extends Object implements MicroPropsGenerator
  • Field Details

  • Constructor Details

  • Method Details

    • mixedMeasuresToMicros

      protected static void mixedMeasuresToMicros(ComplexUnitsConverter.ComplexConverterResult complexConverterResult, DecimalQuantity quantity, MicroProps outMicros)
      Populates micros.mixedMeasures and modifies quantity, based on the values in measures.
    • getOutputUnits

      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.

    • processQuantity

      public MicroProps processQuantity(DecimalQuantity quantity)
      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.

      Specified by:
      processQuantity in interface MicroPropsGenerator
      Parameters:
      quantity - The quantity for consideration and optional mutation.
      Returns:
      A MicroProps instance resolved for the quantity.