All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.roguewave.examples.money.currency.v1_0.FactoryExample
ExchangeFactory
.
An instance of ExchangeFactory
contains an exchange rate table
and at least one exchange group. Exchange groups can construct exchange
objects which are used to perform currency conversions. When presented
with a source/target currency pair the exchange factory searches its list
of exchange groups until it finds one that can create an exchange object
given the source/target pair and the factory's associated exchange rate
table. If no group can create such an object an invalid object is returned
by the factory.
public FactoryExample()
public static void main(String args[])
java com.roguewave.examples.money.currency.v1_0.FactoryExample
Output should appear as follows:
exchanging Belgian Francs to Canadian Dollars using Bilateral Multiplication BEF: 12348.21, CAD: 563.6957865 BEF: 8900.54, CAD: 406.3096510000001 BEF: 373095.0, CAD: 17031.786750000003 BEF: 4343.33, CAD: 198.27301450000002 BEF: 43439.7, CAD: 1983.022305 exchanging Belgian Francs to French Francs using Triangular BEF: 12348.21, CAD: 2005.4099087116565 BEF: 8900.54, CAD: 1445.491379631902 BEF: 373095.0, CAD: 60592.4591411043 BEF: 4343.33, CAD: 705.3781089570552 BEF: 43439.7, CAD: 7054.820480981595 exchanging Belgian Francs to Euro's using Bilateral Division BEF: 12348.21, EUR: 303.02355828220857 BEF: 8900.54, EUR: 218.41815950920247 BEF: 373095.0, EUR: 9155.705521472393 BEF: 4343.33, EUR: 106.58478527607362 BEF: 43439.7, EUR: 1066.0049079754601
protected static boolean initialize()
All Packages Class Hierarchy This Package Previous Next Index