public abstract class AbstractRateProvider extends Object implements javax.money.convert.ExchangeRateProvider
ExchangeRateProvider implementations.| Modifier and Type | Field and Description |
|---|---|
protected Logger |
LOGGER
The logger used.
|
| Constructor and Description |
|---|
AbstractRateProvider(javax.money.convert.ProviderContext providerContext)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static javax.money.NumberValue |
divide(javax.money.NumberValue dividend,
javax.money.NumberValue divisor)
A protected helper method to divide 2
NumberValue types. |
protected static javax.money.NumberValue |
divide(javax.money.NumberValue dividend,
javax.money.NumberValue divisor,
MathContext context)
A protected helper method to divide 2
NumberValue types. |
javax.money.convert.ProviderContext |
getContext() |
javax.money.convert.CurrencyConversion |
getCurrencyConversion(javax.money.convert.ConversionQuery conversionQuery) |
abstract javax.money.convert.ExchangeRate |
getExchangeRate(javax.money.convert.ConversionQuery conversionQuery) |
protected static javax.money.NumberValue |
multiply(javax.money.NumberValue multiplicand,
javax.money.NumberValue multiplier)
A protected helper method to multiply 2
NumberValue types. |
public AbstractRateProvider(javax.money.convert.ProviderContext providerContext)
providerContext - the ProviderContext, not null.public javax.money.convert.ProviderContext getContext()
getContext in interface javax.money.convert.ExchangeRateProviderpublic abstract javax.money.convert.ExchangeRate getExchangeRate(javax.money.convert.ConversionQuery conversionQuery)
getExchangeRate in interface javax.money.convert.ExchangeRateProviderpublic javax.money.convert.CurrencyConversion getCurrencyConversion(javax.money.convert.ConversionQuery conversionQuery)
getCurrencyConversion in interface javax.money.convert.ExchangeRateProviderprotected static javax.money.NumberValue multiply(javax.money.NumberValue multiplicand, javax.money.NumberValue multiplier)
NumberValue types.null an ArithmeticException is thrown.multiplicand - the first value to be multipliedmultiplier - the second value to be multipliedNumberValueprotected static javax.money.NumberValue divide(javax.money.NumberValue dividend, javax.money.NumberValue divisor)
NumberValue types.null an ArithmeticException is thrown.dividend - the first value to be divideddivisor - the value to be divided byNumberValueprotected static javax.money.NumberValue divide(javax.money.NumberValue dividend, javax.money.NumberValue divisor, MathContext context)
NumberValue types.null an ArithmeticException is thrown.dividend - the first value to be divideddivisor - the value to be divided bycontext - the MathContext to useNumberValueCopyright © 2012-2015 JavaMoney. All Rights Reserved.