To create a CurrencyPrecision, use one of the factory methods on Precision.
NumberFormatter
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Precision | Returns: A Precision for chaining or passing to the NumberFormatter rounding() setter.The currency to associate with this rounding strategy. currency)Associates a currency with this rounding strategy. |
| CurrencyPrecision | back to summary |
|---|---|
| pack-priv CurrencyPrecision() | |
| withCurrency | back to summary |
|---|---|
| public Precision withCurrency(Currency currency) Associates a currency with this rounding strategy. Calling this method is not required, because the currency specified in unit() or via a CurrencyAmount passed into format(Measure) is automatically applied to currency rounding strategies. However, this method enables you to override that automatic association. This method also enables numbers to be formatted using currency rounding rules without explicitly using a currency format.
| |