public static final class MonetaryFormats.DefaultMonetaryFormatsSingletonSpi extends Object implements MonetaryFormatsSingletonSpi
MonetaryAmountFormat
instances.
This class is thread-safe.
Constructor and Description |
---|
DefaultMonetaryFormatsSingletonSpi() |
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, oredered correspondingly.null
.public MonetaryAmountFormat getAmountFormat(AmountFormatQuery formatQuery)
MonetaryAmountFormat
given a .AmountFormatQuery
.getAmountFormat
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 boolean isAvailable(AmountFormatQuery formatQuery)
MonetaryAmountFormat
is available given a .AmountFormatQuery
.isAvailable
in interface MonetaryFormatsSingletonSpi
formatQuery
- The format query defining the requirements of the formatter.MonetaryAmountFormat
is matching the query.public boolean isAvailable(Locale locale, String... providers)
MonetaryAmountFormat
is available given a .AmountFormatQuery
.isAvailable
in interface MonetaryFormatsSingletonSpi
locale
- the target Locale
, not null
.providers
- The (optional) providers to be used, oredered correspondingly.MonetaryAmountFormat
is matching the query.public MonetaryAmountFormat getAmountFormat(Locale locale, String... providers)
MonetaryAmountFormat
given a Locale
.getAmountFormat
in interface MonetaryFormatsSingletonSpi
locale
- the target Locale
, not null
.providers
- The (optional) providers to be used, oredered correspondingly.MonetaryAmountFormat
MonetaryException
- if no registered MonetaryAmountFormatProviderSpi
can provide a
corresponding MonetaryAmountFormat
instance.public MonetaryAmountFormat getAmountFormat(String formatName, String... providers)
MonetaryAmountFormat
given a Locale
.getAmountFormat
in interface MonetaryFormatsSingletonSpi
formatName
- the target format name, not null
.providers
- The (optional) providers to be used, oredered correspondingly.MonetaryAmountFormat
MonetaryException
- if no registered MonetaryAmountFormatProviderSpi
can provide a
corresponding MonetaryAmountFormat
instance.Copyright © 2012–2015 JSR 354 - Expert Group. All rights reserved.