task4/solution02/src/org/apidesign/apifest08/currency/Convertor.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 11 Oct 2008 23:38:46 +0200
changeset 61 58ec6da75f6f
parent 45 task3/solution02/src/org/apidesign/apifest08/currency/Convertor.java@251d0ed461fb
permissions -rw-r--r--
Copying structure for task4
     1 package org.apidesign.apifest08.currency;
     2 
     3 import java.util.Currency;
     4 
     5 
     6 /** 
     7  * Converts currencies. To create an instance call {@link ConvertorFactory#createConvertor(Money, Money)}.
     8  */
     9 public interface Convertor {
    10 	/**
    11 	 * Converts amount to its equivalent in the destination currency. 
    12 	 * @param amount 
    13 	 * @param destinationCurrency
    14 	 * @return
    15 	 * @throws IllegalArgumentException if currency of the amount is not supported or if it is not possible to convert it to the destination currency.
    16 	 */
    17 	public Money convert(Money amount, Currency destinationCurrency) throws IllegalArgumentException;
    18 }