public interface ExchangeRate extends CurrencySupplier
CurrencyUnit
.getFactor()
} matches the correct reverse
rate. But in most use cases the reverse rate either has a different rate (not
equal to the reciprocal value), or might not be defined at all. Therefore for
reversing a ExchangeRate one must access an ExchangeRateProvider
and
query for the reverse rate.Comparable
to allow sorting of multiple
exchange rates using the following sorting order;
Serializable
, hereby serializing in the following
form and order:
CurrencyUnit
CurrencyUnit
ConversionContext
Implementations of this interface
ExchangeRate
)Modifier and Type | Method and Description |
---|---|
CurrencyUnit |
getBaseCurrency()
Get the base (source)
CurrencyUnit . |
ConversionContext |
getContext()
Access the
ConversionContext of ExchangeRate . |
CurrencyUnit |
getCurrency()
Get the term (target)
CurrencyUnit . |
List<ExchangeRate> |
getExchangeRateChain()
Access the chain of exchange rates.
|
NumberValue |
getFactor()
Access the rate's bid factor.
|
default boolean |
isDerived()
Allows to evaluate if this exchange rate is a derived exchange rate.
|
ConversionContext getContext()
ConversionContext
of ExchangeRate
.CurrencyUnit getBaseCurrency()
CurrencyUnit
.CurrencyUnit
.CurrencyUnit getCurrency()
CurrencyUnit
.getCurrency
in interface CurrencySupplier
CurrencyUnit
.NumberValue getFactor()
null
.List<ExchangeRate> getExchangeRateChain()
new ExchangeRate[]{this}
.default boolean isDerived()
This method always returns true
, if the chain contains more than
one rate. Direct rates, have also a chain, but with exact one rate.
Copyright © 2012–2016 JSR 354 - Expert Group. All rights reserved.