MonetaryFormatsSingletonSpipublic static final class MonetaryFormats.DefaultMonetaryFormatsSingletonSpi extends Object implements MonetaryFormatsSingletonSpi
MonetaryAmountFormat instances.
This class is thread-safe.
| Constructor | Description |
|---|---|
DefaultMonetaryFormatsSingletonSpi() |
| Modifier and Type | Method | Description |
|---|---|---|
Collection<MonetaryAmountFormat> |
getAmountFormats(AmountFormatQuery formatQuery) |
Access an
MonetaryAmountFormat given a .AmountFormatContext. |
Set<Locale> |
getAvailableLocales(String... providerNames) |
Get all available locales.
|
List<String> |
getDefaultProviderChain() |
This default implementation simply returns all providers defined in arbitrary order.
|
Set<String> |
getProviderNames() |
Get the names of the currently registered format providers.
|
getAmountFormat, getAmountFormat, getAmountFormat, isAvailable, isAvailablepublic Collection<MonetaryAmountFormat> getAmountFormats(AmountFormatQuery formatQuery)
MonetaryAmountFormat given a .AmountFormatContext.getAmountFormats in interface MonetaryFormatsSingletonSpiformatQuery - The format query defining the requirements of the formatter.MonetaryAmountFormatMonetaryException - if no registered .MonetaryAmountFormatProviderSpi can provide a
corresponding MonetaryAmountFormat instance.public Set<String> getProviderNames()
MonetaryFormatsSingletonSpigetProviderNames in interface MonetaryFormatsSingletonSpipublic List<String> getDefaultProviderChain()
getDefaultProviderChain in interface MonetaryFormatsSingletonSpipublic Set<Locale> getAvailableLocales(String... providerNames)
.MonetaryAmountFormatProviderSpi#getAvailableLocales().getAvailableLocales in interface MonetaryFormatsSingletonSpiproviderNames - The (optional) providers to be used, ordered correspondingly.null.Copyright © 2012–2018 JSR 354 - Expert Group. All rights reserved.