public class IdentityRateProvider extends AbstractRateProvider
ExchangeRateProvider
that provides exchange rate with factor
one for identical base/term currencies.LOGGER
Constructor and Description |
---|
IdentityRateProvider()
Constructor, also loads initial data.
|
Modifier and Type | Method and Description |
---|---|
javax.money.convert.ExchangeRate |
getExchangeRate(javax.money.convert.ConversionQuery query) |
javax.money.convert.ExchangeRate |
getReversed(javax.money.convert.ExchangeRate rate) |
boolean |
isAvailable(javax.money.convert.ConversionQuery conversionQuery)
Check if this provider can provide a rate, which is only the case if base and term are equal.
|
divide, divide, getContext, getCurrencyConversion, multiply
public IdentityRateProvider() throws MalformedURLException
MalformedURLException
public boolean isAvailable(javax.money.convert.ConversionQuery conversionQuery)
conversionQuery
- the required ConversionQuery
, not null
public javax.money.convert.ExchangeRate getExchangeRate(javax.money.convert.ConversionQuery query)
getExchangeRate
in interface javax.money.convert.ExchangeRateProvider
getExchangeRate
in class AbstractRateProvider
public javax.money.convert.ExchangeRate getReversed(javax.money.convert.ExchangeRate rate)
Copyright © 2012-2015 JavaMoney. All Rights Reserved.