public interface RoundingProviderSpi
This SPI allows to extends/override the roundings available for
CurrencyUnit
. The JSRs implementation already provides default
roundings. By registering instances of this interface using the
Bootstrap
, the default behaviour can be
overridden and extended, e.g. for supporting also special roundings.
Implementations of this interface must be
- thread-safe
- not require loading of other resources.
- Author:
- Anatole Tresch
-
Method Summary
Modifier and Type Method Description default java.lang.String
getProviderName()
Get the provider's unique name.MonetaryRounding
getRounding(RoundingQuery query)
Evaluate the rounding that match the given query.java.util.Set<java.lang.String>
getRoundingNames()
Access the ids of the roundings defined by this provider.
-
Method Details
-
getRounding
Evaluate the rounding that match the given query.- Parameters:
query
- the rounding query.- Returns:
- the matching rounding instance, or
null
.
-
getRoundingNames
java.util.Set<java.lang.String> getRoundingNames()Access the ids of the roundings defined by this provider.- Returns:
- the ids of the defined roundings, never
null
.
-
getProviderName
default java.lang.String getProviderName()Get the provider's unique name.- Returns:
- the provider's unique name, not
null
.
-