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 | Description |
---|---|---|
class |
CurrencyRounder |
A class that defines a rounding strategy parameterized by a currency to be used when formatting numbers in
NumberFormatter.
|
class |
FractionRounder |
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.
|
Modifier and Type | Method | Description |
---|---|---|
static Rounder |
Rounder.fixedDigits(int minMaxSignificantDigits) |
Show numbers rounded if necessary to a certain number of significant digits or significant figures.
|
static Rounder |
Rounder.increment(BigDecimal roundingIncrement) |
Show numbers rounded if necessary to the closest multiple of a certain rounding increment.
|
static Rounder |
Rounder.maxDigits(int maxSignificantDigits) |
Show numbers rounded if necessary to a certain number of significant digits/figures.
|
static Rounder |
Rounder.minDigits(int minSignificantDigits) |
Always show at least a certain number of significant digits/figures, padding with zeros if necessary.
|
static Rounder |
Rounder.minMaxDigits(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 Rounder |
Rounder.unlimited() |
Show all available digits to full precision.
|
Rounder |
CurrencyRounder.withCurrency(Currency currency) |
Associates a currency with this rounding strategy.
|
Rounder |
FractionRounder.withMaxDigits(int maxSignificantDigits) |
Ensure that no more than this number of significant digits are retained when rounding according to fraction
rules.
|
Rounder |
FractionRounder.withMinDigits(int minSignificantDigits) |
Ensure that no less than this number of significant digits are retained when rounding according to fraction
rules.
|
Rounder |
Rounder.withMode(MathContext mathContext) |
Deprecated.
This API is ICU internal only.
|
Rounder |
Rounder.withMode(RoundingMode roundingMode) |
Sets the
RoundingMode to use when picking the direction to round (up or down). |
Modifier and Type | Method | Description |
---|---|---|
T |
NumberFormatterSettings.rounding(Rounder rounder) |
Specifies the rounding strategy to use when formatting numbers.
|
Copyright ? 2016 Unicode, Inc. and others.