To create a Precision, use one of the factory methods.
NumberFormatter
| Modifier and Type | Class and Description |
|---|---|
| public static class | Precision.BogusRounder
Deprecated
This API is ICU internal only.
An BogusRounder's MathContext into precision.
|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | Precision.IncrementFiveRounderImpl
Used for increments with 5 as the only digit (nickel rounding). |
| pack-priv static class | Precision.IncrementOneRounderImpl
Used for increments with 1 as the only digit. |
| pack-priv static class | Precision.IncrementRounderImpl
Used for strange increments like 3.14. |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final Precision. | BOGUS_PRECISION
Deprecated
ICU internal only.
|
| pack-priv static final Precision. | |
| pack-priv static final Precision. | |
| pack-priv static final Precision. | |
| pack-priv static final Precision. | |
| pack-priv static final Precision. | |
| pack-priv static final Precision. | |
| pack-priv MathContext | |
| pack-priv static final Precision. | |
| pack-priv static final Precision. | |
| pack-priv static final Precision. | |
| pack-priv static final Precision. | |
| pack-priv static final Precision. | |
| pack-priv NumberFormatter. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| pack-priv int | Returns: The number of orders of magnitude the input was adjusted by this method.The quantity to process. input, MultiplierProducer Function to call to return a multiplier based on a magnitude. producer)
Deprecated
as a consequence of
Rounding endpoint used by Engineering and Compact notation.
DecimalQuantity being deprecated.
|
| pack-priv static CurrencyPrecision | |
| pack-priv static FractionPrecision | |
| pack-priv static Precision | constructFractionSignificant(FractionPrecision base_, int minSig, int maxSig, NumberFormatter.
|
| pack-priv static Precision | |
| pack-priv static Precision | |
| pack-priv static Precision | |
| pack-priv static Precision | |
| pack-priv abstract Precision | |
| pack-priv void | createCopyHelper(Precision copy)
Call this function to copy the fields from the Precision base class. |
| public static CurrencyPrecision | Returns: A CurrencyPrecision for chaining or passing to the NumberFormatter precision() setter.Either STANDARD (for digital transactions) or CASH (for transactions where the rounding
increment may be limited by the available denominations of cash or coins). currencyUsageShow numbers rounded and padded according to the rules for the currency unit. |
| public static FractionPrecision | Returns: A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.The minimum and maximum number of numerals to display after the decimal separator
(rounding if too long or padding with zeros if too short). minMaxFractionPlaces)Show numbers rounded if necessary to a certain number of fraction places (numerals after the decimal separator). |
| public static Precision | Returns: A Precision for chaining or passing to the NumberFormatter precision() setter.The minimum and maximum number of significant digits to display (rounding if too long
or padding with zeros if too short). minMaxSignificantDigits)Show numbers rounded if necessary to a certain number of significant digits or significant figures. |
| private static int | |
| private static int | getDisplayMagnitudeSignificant(DecimalQuantity value, int minSig)
Deprecated
as a consequence of
DecimalQuantity being deprecated.
|
| private static int | |
| private static int | getRoundingMagnitudeSignificant(DecimalQuantity value, int maxSig)
Deprecated
as a consequence of
DecimalQuantity being deprecated.
|
| public static Precision | Returns: A Precision for chaining or passing to the NumberFormatter precision() setter.The increment to which to round numbers. roundingIncrement)Show numbers rounded if necessary to the closest multiple of a certain rounding increment. |
| public static FractionPrecision | Returns: A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.Show numbers rounded if necessary to the nearest integer. |
| public static FractionPrecision | Returns: A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.The maximum number of numerals to display after the decimal mark (rounding if
necessary). maxFractionPlaces)Show numbers rounded if necessary to a certain number of fraction places (numerals after the decimal separator). |
| public static Precision | Returns: A Precision for chaining or passing to the NumberFormatter precision() setter.The maximum number of significant digits to display (rounding if too long). maxSignificantDigits)Show numbers rounded if necessary to a certain number of significant digits/figures. |
| public static FractionPrecision | Returns: A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.The minimum number of numerals to display after the decimal separator (padding with
zeros if necessary). minFractionPlaces)Always show at least a certain number of fraction places after the decimal separator, padding with zeros if necessary. |
| public static FractionPrecision | Returns: A FractionPrecision for chaining or passing to the NumberFormatter precision() setter.The minimum number of numerals to display after the decimal separator (padding with
zeros if necessary). minFractionPlaces, int The maximum number of numerals to display after the decimal separator (rounding if
necessary). maxFractionPlaces)Show numbers rounded if necessary to a certain number of fraction places (numerals after the decimal separator); in addition, always show at least a certain number of places after the decimal separator, padding with zeros if necessary. |
| public static Precision | Returns: A Precision for chaining or passing to the NumberFormatter precision() setter.The minimum number of significant digits to display (padding with zeros if necessary). minSignificantDigits, int The maximum number of significant digits to display (rounding if necessary). maxSignificantDigits)Show numbers rounded if necessary to a certain number of significant digits/figures; in addition, always show at least a certain number of significant digits, padding with zeros if necessary. |
| public static Precision | Returns: A Precision for chaining or passing to the NumberFormatter precision() setter.The minimum number of significant digits to display (padding with zeros if too short). minSignificantDigits)Always show at least a certain number of significant digits/figures, padding with zeros if necessary. |
| pack-priv void | setResolvedMinFraction(DecimalQuantity value, int resolvedMinFraction)
Deprecated
as a consequence of
DecimalQuantity being deprecated.
|
| public Precision | trailingZeroDisplay(NumberFormatter.
Option to configure the display of trailing zeros. trailingZeroDisplayConfigure how trailing zeros are displayed on numbers. |
| public static Precision | Returns: A Precision for chaining or passing to the NumberFormatter precision() setter.Show all available digits to full precision. |
| pack-priv Precision | Returns: A Rounder object ready for use.A currency object to use in case the input object needs it. currency)Returns a valid working Rounder. |
| public Precision | withMode(MathContext mathContext)
Deprecated
This API is ICU internal only.
Sets a MathContext to use on this Precision.
|