Package | Description |
---|---|
com.ibm.icu.number |
Library for localized number formatting introduced in ICU 60; for usage, see com.ibm.icu.number.NumberFormatter.
|
Modifier and Type | Class and Description |
---|---|
class |
CurrencyPrecision
A class that defines a rounding strategy parameterized by a currency to be used when formatting
numbers in NumberFormatter.
|
class |
FractionPrecision
A class that defines a rounding strategy based on a number of fraction places and optionally
significant digits to be used when formatting numbers in NumberFormatter.
|
static class |
Precision.BogusRounder
Deprecated.
This API is ICU internal only.
|
Modifier and Type | Method and Description |
---|---|
static Precision |
Precision.fixedSignificantDigits(int minMaxSignificantDigits)
Show numbers rounded if necessary to a certain number of significant digits or significant
figures.
|
static Precision |
Precision.increment(BigDecimal roundingIncrement)
Show numbers rounded if necessary to the closest multiple of a certain rounding increment.
|
Precision |
Precision.BogusRounder.into(Precision precision)
Deprecated.
This API is ICU internal only.
|
static Precision |
Precision.maxSignificantDigits(int maxSignificantDigits)
Show numbers rounded if necessary to a certain number of significant digits/figures.
|
static Precision |
Precision.minMaxSignificantDigits(int minSignificantDigits,
int 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.
|
static Precision |
Precision.minSignificantDigits(int minSignificantDigits)
Always show at least a certain number of significant digits/figures, padding with zeros if
necessary.
|
Precision |
Precision.trailingZeroDisplay(NumberFormatter.TrailingZeroDisplay trailingZeroDisplay)
Configure how trailing zeros are displayed on numbers.
|
static Precision |
Precision.unlimited()
Show all available digits to full precision.
|
Precision |
CurrencyPrecision.withCurrency(Currency currency)
Associates a currency with this rounding strategy.
|
Precision |
FractionPrecision.withMaxDigits(int maxSignificantDigits)
Ensure that no more than this number of significant digits are retained when rounding according to
fraction rules.
|
Precision |
FractionPrecision.withMinDigits(int minSignificantDigits)
Ensure that no less than this number of significant digits are retained when rounding according to
fraction rules.
|
Precision |
Precision.withMode(MathContext mathContext)
Deprecated.
This API is ICU internal only.
|
Precision |
FractionPrecision.withSignificantDigits(int minSignificantDigits,
int maxSignificantDigits,
NumberFormatter.RoundingPriority priority)
Override maximum fraction digits with maximum significant digits depending on the magnitude
of the number.
|
Modifier and Type | Method and Description |
---|---|
Precision |
Precision.BogusRounder.into(Precision precision)
Deprecated.
This API is ICU internal only.
|
T |
NumberFormatterSettings.precision(Precision precision)
Specifies the rounding precision to use when formatting numbers.
|
Copyright © 2016 Unicode, Inc. and others.