Class UsagePrefsHandler

    • Method Detail

      • getOutputUnits

        public java.util.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.