public abstract class AbstractRateProvider extends BaseExchangeRateProvider
ExchangeRateProvider implementations.| Modifier and Type | Field and Description |
|---|---|
protected Logger |
LOGGER
The logger used.
|
| Constructor and Description |
|---|
AbstractRateProvider(ProviderContext providerContext)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static NumberValue |
divide(NumberValue dividend,
NumberValue divisor)
A protected helper method to divide 2
NumberValue types.If either of the values is null an ArithmeticException is thrown. |
protected static NumberValue |
divide(NumberValue dividend,
NumberValue divisor,
MathContext context)
A protected helper method to divide 2
NumberValue types.If either of the values is null an ArithmeticException is thrown. |
protected String |
formatLocalDate(Calendar calendar) |
ProviderContext |
getContext() |
CurrencyConversion |
getCurrencyConversion(ConversionQuery conversionQuery) |
abstract ExchangeRate |
getExchangeRate(ConversionQuery conversionQuery) |
protected static NumberValue |
multiply(NumberValue multiplicand,
NumberValue multiplier)
A protected helper method to multiply 2
NumberValue types.If either of the values is null an ArithmeticException is thrown. |
getCurrencyConversion, getCurrencyConversion, getExchangeRate, getExchangeRate, getReversed, isAvailable, isAvailable, isAvailablepublic AbstractRateProvider(ProviderContext providerContext)
providerContext - the ProviderContext, not null.public ProviderContext getContext()
public abstract ExchangeRate getExchangeRate(ConversionQuery conversionQuery)
public CurrencyConversion getCurrencyConversion(ConversionQuery conversionQuery)
protected static NumberValue multiply(NumberValue multiplicand, NumberValue multiplier)
NumberValue types.null an ArithmeticException is thrown.multiplicand - the first value to be multipliedmultiplier - the second value to be multipliedNumberValueprotected static NumberValue divide(NumberValue dividend, NumberValue divisor)
NumberValue types.null an ArithmeticException is thrown.dividend - the first value to be divideddivisor - the value to be divided byNumberValueprotected static NumberValue divide(NumberValue dividend, 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 useNumberValueprotected String formatLocalDate(Calendar calendar)
Copyright © 2012–2020 JavaMoney. All rights reserved.