All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.roguewave.money.currency.v1_0.DivisionGroup
DivisionGroup
is made up of objects that convert a source currency to a
target currency by dividing the amount of the source currency by a conversion factor.
NOTE -- Currencies that use the triangular conversion method required by
the European Monetary Union are available in class EuroGroup
. Currencies
that convert a source currency to a target currency by multiplying the amount of the
source by a conversion factor are available in MultiplicationGroup
.
The division exchange group overrides the base class method:
Exchange getExchange(String source, String target, ExchangeRateTable rates);
so that it looks in exchange rate table rates for an exchange rate that converts the
target currency to the source currency. If it finds one, it creates and returns an
Exchange object with a DivisionExchange
implementation. If it does not
find one, it returns a null
value.
public static final String NAME
public DivisionGroup()
public Exchange getExchange(String source, String target, ExchangeRateTable rates)
s
in the source currency to an amount
t
in the target currency you would find the rate r
for the source/target pair in the exchange rate table and multiply:
t = s * t
The division exchange group creates exchange objects that divide the source amounts by the exchange rate to obtain the target amount. Thus this division exchange rate for a given source/target pair is found by searching the exchange rate table for a multiplicative rate for the target/source pair
null
value
is returned.
public String getName()
All Packages Class Hierarchy This Package Previous Next Index