Top Description Fields Constructors Methods
org.javamoney.moneta.convert.imf

public Class IMFHistoricRateProvider

extends IMFAbstractRateProvider
Class Inheritance
Imports
java.io.IOException, .InputStream, java.time.LocalDate, .YearMonth, java.util.ArrayList, .List, .Map, .Objects, java.util.logging.Level, .Logger, java.util.stream.Collectors, .Stream, javax.money.CurrencyUnit, javax.money.convert.ConversionQuery, .ExchangeRate, .ProviderContext, .ProviderContextBuilder, .RateType, javax.money.spi.Bootstrap, org.javamoney.moneta.convert.imf.IMFRateReadingHandler.RateIMFResult, org.javamoney.moneta.spi.loader.LoaderService

Find by historic from IMF
Author
otaviojava
Since
1.0.1

Field Summary

Modifier and TypeField and Description
private final List<YearMonth>
private static final ProviderContext
private static final String
private static final Logger
Inherited from org.javamoney.moneta.convert.imf.IMFAbstractRateProvider:
COMPARATOR_EXCHANGE_BY_LOCAL_DATECURRENCIES_BY_NAMEcurrencyToSdrDEFAULT_USER_AGENThandlerloadLockloadStateSDRsdrToCurrency

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Map<CurrencyUnit, List<ExchangeRate>>
public ExchangeRate
private void
private static List<ExchangeRate>
Inherited from org.javamoney.moneta.convert.imf.IMFAbstractRateProvider:
newDataLoadedtoString

Field Detail

cachedHistoricback to summary
private final List<YearMonth> cachedHistoric
CONTEXTback to summary
private static final ProviderContext CONTEXT
DATA_IDback to summary
private static final String DATA_ID
LOGback to summary
private static final Logger LOG

Hides org.javamoney.moneta.convert.imf.IMFAbstractRateProvider.LOG.

Constructor Detail

IMFHistoricRateProviderback to summary
public IMFHistoricRateProvider()

Method Detail

combineback to summary
private Map<CurrencyUnit, List<ExchangeRate>> combine(Map<CurrencyUnit, List<ExchangeRate>> source, Map<CurrencyUnit, List<ExchangeRate>> destination)
getExchangeRateback to summary
public ExchangeRate getExchangeRate(ConversionQuery conversionQuery)

Overrides org.javamoney.moneta.convert.imf.IMFAbstractRateProvider.getExchangeRate.

Implements javax.money.convert.ExchangeRateProvider.getExchangeRate.

Doc from javax.money.convert.ExchangeRateProvider.getExchangeRate.

Access a ExchangeRate using the given currencies. The ExchangeRate may be, depending on the data provider, real-time or deferred. This method should return the rate that is currently valid.

Annotations
@Override
loadFromRemoteback to summary
private void loadFromRemote(Map<IMFHistoricalType, InputStream> resources)
mergeback to summary
private static List<ExchangeRate> merge(List<ExchangeRate> ratesA, List<ExchangeRate> ratesB)