public final class TestRoundingProvider extends java.lang.Object implements RoundingProviderSpi
| Constructor and Description |
|---|
TestRoundingProvider() |
| Modifier and Type | Method and Description |
|---|---|
MonetaryOperator |
getCashRounding(CurrencyUnit currency)
Access the current valid rounding for the given
CurrencyUnit. |
MonetaryOperator |
getCashRounding(CurrencyUnit currency,
long timestamp)
Access the cash rounding for the given
CurrencyUnit, that was
valid at the given timestamp. |
MonetaryOperator |
getCustomRounding(java.lang.String customRoundingId)
Access an
MonetaryOperator for custom rounding
MonetaryAmount instances. |
java.util.Set<java.lang.String> |
getCustomRoundingIds()
Access the ids of the custom roundigs defined by this provider.
|
MonetaryOperator |
getRounding(CurrencyUnit currency)
Access the current valid rounding for the given
CurrencyUnit. |
MonetaryOperator |
getRounding(CurrencyUnit currency,
long timestamp)
Access the rounding for the given
CurrencyUnit, that was valid at
the given timestamp. |
MonetaryOperator |
getRounding(MonetaryContext monetaryContext)
Access a rounding that models the given
MonetaryContext. |
public MonetaryOperator getRounding(CurrencyUnit currency)
RoundingProviderSpiCurrencyUnit.
Instances of MonetaryOperator returned, must be thread safe and
immutable.
getRounding in interface RoundingProviderSpicurrency - the currency for which a rounding operator should be obtained,
not null.null.public MonetaryOperator getRounding(CurrencyUnit currency, long timestamp)
RoundingProviderSpiCurrencyUnit, that was valid at
the given timestamp.
Instances of MonetaryOperator returned, must be thread safe and
immutable.
getRounding in interface RoundingProviderSpicurrency - the currency for which a rounding operator should be obtained,
not null.timestamp - the target UTC timestamp, when the rounding should be valid.null.public MonetaryOperator getCashRounding(CurrencyUnit currency)
RoundingProviderSpiCurrencyUnit.
Instances of MonetaryOperator returned, must be thread safe and
immutable.
getCashRounding in interface RoundingProviderSpicurrency - the currency for which a rounding operator should be obtained,
not null.null.public MonetaryOperator getCashRounding(CurrencyUnit currency, long timestamp)
RoundingProviderSpiCurrencyUnit, that was
valid at the given timestamp.
Instances of MonetaryOperator returned, must be thread safe and
immutable.
getCashRounding in interface RoundingProviderSpicurrency - the currency for which a rounding operator should be obtained,
not null.timestamp - the target UTC timestamp, when the rounding should be valid.null.public MonetaryOperator getCustomRounding(java.lang.String customRoundingId)
RoundingProviderSpiMonetaryOperator for custom rounding
MonetaryAmount instances.getCustomRounding in interface RoundingProviderSpicustomRoundingId - The customRounding identifier.MonetaryOperator implementing the
rounding, or null.public MonetaryOperator getRounding(MonetaryContext monetaryContext)
RoundingProviderSpiMonetaryContext.getRounding in interface RoundingProviderSpimonetaryContext - The target MonetaryContextnullpublic java.util.Set<java.lang.String> getCustomRoundingIds()
RoundingProviderSpigetCustomRoundingIds in interface RoundingProviderSpinull.