Top Description Fields Constructors Methods
org.javamoney.moneta.spi

public Class LazyBoundCurrencyConversion

extends AbstractCurrencyConversion
implements CurrencyConversion
Class Inheritance
All Implemented Interfaces
javax.money.convert.CurrencyConversion, javax.money.CurrencySupplier, javax.money.MonetaryOperator
Imports
javax.money.CurrencyUnit, .MonetaryAmount, javax.money.convert.ConversionContext, .ConversionQuery, .ConversionQueryBuilder, .CurrencyConversion, .ExchangeRate, .ExchangeRateProvider

This class defines a CurrencyConversion that is converting to a specific target CurrencyUnit. Each instance of this class is bound to a specific ExchangeRateProvider, a term CurrencyUnit and a target timestamp.
Authors
Anatole Tresch, Werner Keil, otaviojava

Field Summary

Modifier and TypeField and Description
private final ConversionQuery
private final ExchangeRateProvider
Inherited from org.javamoney.moneta.spi.AbstractCurrencyConversion:
KEY_SCALE

Constructor Summary

AccessConstructor and Description
public
LazyBoundCurrencyConversion(ConversionQuery conversionQuery, ExchangeRateProvider rateProvider, ConversionContext conversionContext)

Method Summary

Modifier and TypeMethod and Description
public ExchangeRate

Returns:

the exchange rate type if this instance.
getExchangeRate
(MonetaryAmount amount)

Implements abstract org.javamoney.moneta.spi.AbstractCurrencyConversion.getExchangeRate.

Implements javax.money.convert.CurrencyConversion.getExchangeRate.

Get the exchange rate type that this provider instance is providing data for.

public ExchangeRateProvider
public String
toString()

Overrides org.javamoney.moneta.spi.AbstractCurrencyConversion.toString.

Returns a string representation of the object.

public CurrencyConversion
Inherited from org.javamoney.moneta.spi.AbstractCurrencyConversion:
applygetContextgetCurrencyroundFactor

Field Detail

conversionQueryback to summary
private final ConversionQuery conversionQuery
rateProviderback to summary
private final ExchangeRateProvider rateProvider

Constructor Detail

LazyBoundCurrencyConversionback to summary
public LazyBoundCurrencyConversion(ConversionQuery conversionQuery, ExchangeRateProvider rateProvider, ConversionContext conversionContext)

Method Detail

getExchangeRateback to summary
public ExchangeRate getExchangeRate(MonetaryAmount amount)

Implements abstract org.javamoney.moneta.spi.AbstractCurrencyConversion.getExchangeRate.

Implements javax.money.convert.CurrencyConversion.getExchangeRate.

Get the exchange rate type that this provider instance is providing data for.

Returns:ExchangeRate

the exchange rate type if this instance.

Annotations
@Override
getExchangeRateProviderback to summary
public ExchangeRateProvider getExchangeRateProvider()

Implements javax.money.convert.CurrencyConversion.getExchangeRateProvider.

Doc from javax.money.convert.CurrencyConversion.getExchangeRateProvider.

Access the underlying javax.money.convert.ExchangeRateProvider.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.javamoney.moneta.spi.AbstractCurrencyConversion.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
withback to summary
public CurrencyConversion with(ConversionContext conversionContext)

Implements abstract org.javamoney.moneta.spi.AbstractCurrencyConversion.with.

Annotations
@Override