public static final class MonetaryFormats.DefaultMonetaryFormatsSingletonSpi extends Object implements MonetaryFormatsSingletonSpi
MonetaryAmountFormat
instances.
This class is thread-safe.
Constructor and Description |
---|
DefaultMonetaryFormatsSingletonSpi() |
Modifier and Type | Method and 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAmountFormat, getAmountFormat, getAmountFormat, isAvailable, isAvailable
public Collection<MonetaryAmountFormat> getAmountFormats(AmountFormatQuery formatQuery)
MonetaryAmountFormat
given a .AmountFormatContext
.getAmountFormats
in interface MonetaryFormatsSingletonSpi
formatQuery
- The format query defining the requirements of the formatter.MonetaryAmountFormat
MonetaryException
- if no registered .MonetaryAmountFormatProviderSpi
can provide a
corresponding MonetaryAmountFormat
instance.public Set<String> getProviderNames()
MonetaryFormatsSingletonSpi
getProviderNames
in interface MonetaryFormatsSingletonSpi
public List<String> getDefaultProviderChain()
getDefaultProviderChain
in interface MonetaryFormatsSingletonSpi
public Set<Locale> getAvailableLocales(String... providerNames)
.MonetaryAmountFormatProviderSpi#getAvailableLocales()
.getAvailableLocales
in interface MonetaryFormatsSingletonSpi
providerNames
- The (optional) providers to be used, ordered correspondingly.null
.Copyright © 2012–2016 JSR 354 - Expert Group. All rights reserved.