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)
RoundingProviderSpi
CurrencyUnit
.
Instances of MonetaryOperator
returned, must be thread safe and
immutable.
getRounding
in interface RoundingProviderSpi
currency
- the currency for which a rounding operator should be obtained,
not null
.null
.public MonetaryOperator getRounding(CurrencyUnit currency, long timestamp)
RoundingProviderSpi
CurrencyUnit
, that was valid at
the given timestamp.
Instances of MonetaryOperator
returned, must be thread safe and
immutable.
getRounding
in interface RoundingProviderSpi
currency
- 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)
RoundingProviderSpi
CurrencyUnit
.
Instances of MonetaryOperator
returned, must be thread safe and
immutable.
getCashRounding
in interface RoundingProviderSpi
currency
- the currency for which a rounding operator should be obtained,
not null
.null
.public MonetaryOperator getCashRounding(CurrencyUnit currency, long timestamp)
RoundingProviderSpi
CurrencyUnit
, that was
valid at the given timestamp.
Instances of MonetaryOperator
returned, must be thread safe and
immutable.
getCashRounding
in interface RoundingProviderSpi
currency
- 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)
RoundingProviderSpi
MonetaryOperator
for custom rounding
MonetaryAmount
instances.getCustomRounding
in interface RoundingProviderSpi
customRoundingId
- The customRounding identifier.MonetaryOperator
implementing the
rounding, or null
.public MonetaryOperator getRounding(MonetaryContext monetaryContext)
RoundingProviderSpi
MonetaryContext
.getRounding
in interface RoundingProviderSpi
monetaryContext
- The target MonetaryContext
null
public java.util.Set<java.lang.String> getCustomRoundingIds()
RoundingProviderSpi
getCustomRoundingIds
in interface RoundingProviderSpi
null
.