public final class MonetaryFormats
extends java.lang.Object
MonetaryAmountFormat
instances.
This class is thread-safe.
Modifier and Type | Method and Description |
---|---|
static MonetaryAmountFormat |
getAmountFormat(AmountStyle style)
Access an
MonetaryAmountFormat given a AmountStyle . |
static MonetaryAmountFormat |
getAmountFormat(java.util.Locale locale)
Access the default
MonetaryAmountFormat given a Locale . |
static java.util.Set<java.util.Locale> |
getAvailableLocales()
Get all available locales.
|
public static MonetaryAmountFormat getAmountFormat(AmountStyle style)
MonetaryAmountFormat
given a AmountStyle
.style
- the target AmountStyle
, not null
.MonetaryAmountFormat
MonetaryException
- if no registered MonetaryAmountFormatProviderSpi
can provide a
corresponding MonetaryAmountFormat
instance.public static MonetaryAmountFormat getAmountFormat(java.util.Locale locale)
MonetaryAmountFormat
given a Locale
.locale
- the target Locale
, not null
.MonetaryAmountFormat
MonetaryException
- if no registered MonetaryAmountFormatProviderSpi
can provide a
corresponding MonetaryAmountFormat
instance.public static final java.util.Set<java.util.Locale> getAvailableLocales()
AmountStyle.getAvailableLocales()
.null
.