reverseCalculationByFractionCurrencyUnit(ExchangeRate, long) method

Syntax

BigDecimal reverseCalculationByFractionCurrencyUnit ( ExchangeRate exchangeRate , long targetAmount )

Parameters

Returns

the required amount of the source currency to convert as BigDecimal

Usage

Performs a "reverse conversion", calculating the necessary amount of the source currency required to receive the specified amount of the target currency.

Note

that this method should NOT be used for a currency conversion in the other direction; it is intended to be used to calculate the "appropriate" source amount.

the required amount of the source currency to convert as BigDecimal