To create a Multiplier, use one of the factory methods.
NumberFormatter
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final BigDecimal | |
| private static final BigDecimal | |
| private static final BigDecimal | |
| private static final Scale | |
| private static final Scale | |
| pack-priv final int | |
| pack-priv final MathContext | |
| pack-priv final BigDecimal | |
| private static final Scale |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public static Scale | Returns: A Multiplier for passing to the setter in NumberFormatter.Multiply numbers by an arbitrary value before formatting. |
| public static Scale | Returns: A Multiplier for passing to the setter in NumberFormatter.Multiply numbers by an arbitrary value before formatting. |
| public static Scale | Returns: A Multiplier for passing to the setter in NumberFormatter.Multiply a number by both a power of ten and by an arbitrary double value before formatting. |
| pack-priv boolean | |
| public static Scale | Returns: A Multiplier to prevent any multiplication.Do not change the value of numbers when formatting or parsing. |
| public static Scale | Returns: A Multiplier for passing to the setter in NumberFormatter.Multiply numbers by 100 before formatting. |
| public Scale |
| arbitrary | back to summary |
|---|---|
| pack-priv final BigDecimal arbitrary | |
| BIG_DECIMAL_100 | back to summary |
|---|---|
| private static final BigDecimal BIG_DECIMAL_100 | |
| BIG_DECIMAL_1000 | back to summary |
|---|---|
| private static final BigDecimal BIG_DECIMAL_1000 | |
| DEFAULT | back to summary |
|---|---|
| private static final Scale DEFAULT | |
| HUNDRED | back to summary |
|---|---|
| private static final Scale HUNDRED | |
| magnitude | back to summary |
|---|---|
| pack-priv final int magnitude | |
| mc | back to summary |
|---|---|
| pack-priv final MathContext mc | |
| reciprocal | back to summary |
|---|---|
| pack-priv final BigDecimal reciprocal | |
| THOUSAND | back to summary |
|---|---|
| private static final Scale THOUSAND | |
| Scale | back to summary |
|---|---|
| private Scale(int magnitude, BigDecimal arbitrary) | |
| Scale | back to summary |
|---|---|
| private Scale(int magnitude, BigDecimal arbitrary, MathContext mc) | |
| applyReciprocalTo | back to summary |
|---|---|
| public void applyReciprocalTo(DecimalQuantity quantity)
Deprecated ICU 62 This API is ICU internal only.
| |
| applyTo | back to summary |
|---|---|
| public void applyTo(DecimalQuantity quantity)
Deprecated ICU 62 This API is ICU internal only.
| |
| byBigDecimal | back to summary |
|---|---|
| public static Scale byBigDecimal(BigDecimal multiplicand) Multiply numbers by an arbitrary value before formatting. Useful for unit conversions. This method takes a BigDecimal; also see the version that takes a double.
| |
| byDouble | back to summary |
|---|---|
| public static Scale byDouble(double multiplicand) Multiply numbers by an arbitrary value before formatting. Useful for unit conversions. This method takes a double; also see the version that takes a BigDecimal.
| |
| byDoubleAndPowerOfTen | back to summary |
|---|---|
| public static Scale byDoubleAndPowerOfTen(double multiplicand, int power) Multiply a number by both a power of ten and by an arbitrary double value before formatting.
| |
| isValid | back to summary |
|---|---|
| pack-priv boolean isValid() Returns whether the multiplier will change the number. | |
| none | back to summary |
|---|---|
| public static Scale none() Do not change the value of numbers when formatting or parsing.
| |
| powerOfTen | back to summary |
|---|---|
| public static Scale powerOfTen(int power) Multiply numbers by 100 before formatting. Useful for combining with a percent unit: NumberFormatter.with().unit(NoUnit.PERCENT).multiplier(Multiplier.powerOfTen(2))
| |
| withMathContext | back to summary |
|---|---|
| public Scale withMathContext(MathContext mc)
Deprecated ICU 62 This API is ICU internal only.
| |