public abstract class AbstractRateProvider extends BaseExchangeRateProvider
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. |
protected String |
formatLocalDate(Calendar calendar) |
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. |
getCurrencyConversion, getCurrencyConversion, getExchangeRate, getExchangeRate, getReversed, isAvailable, isAvailable, isAvailable
public AbstractRateProvider(javax.money.convert.ProviderContext providerContext)
providerContext
- the ProviderContext
, not null.public javax.money.convert.ProviderContext getContext()
public abstract javax.money.convert.ExchangeRate getExchangeRate(javax.money.convert.ConversionQuery conversionQuery)
public javax.money.convert.CurrencyConversion getCurrencyConversion(javax.money.convert.ConversionQuery conversionQuery)
protected 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 multipliedNumberValue
protected 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 byNumberValue
protected 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 useNumberValue
protected String formatLocalDate(Calendar calendar)
Copyright © 2012-2015 JavaMoney. All Rights Reserved.