task1/solution02/src/org/apidesign/apifest08/currency/Convertor.java
author japod@localhost
Tue, 30 Sep 2008 11:47:02 +0200
changeset 16 2864c6d744c0
parent 6 97662396c0fd
permissions -rw-r--r--
solution 02 updated to 1.5
japod@6
     1
package org.apidesign.apifest08.currency;
japod@6
     2
japod@6
     3
import java.util.Currency;
japod@6
     4
japod@6
     5
japod@6
     6
/** 
japod@16
     7
 * Converts currencies. To create an instance call {@link ConvertorFactory#createConvertor(Money, Money)}.
japod@6
     8
 */
japod@6
     9
public interface Convertor {
japod@6
    10
	/**
japod@16
    11
	 * Converts amount to its equivalent in the destination currency. 
japod@16
    12
	 * @param amount 
japod@16
    13
	 * @param destinationCurrency
japod@6
    14
	 * @return
japod@16
    15
	 * @throws IllegalArgumentException if currency of the amount is not supported or if it is not possible to convert it to the destination currency.
japod@6
    16
	 */
japod@16
    17
	public Money convert(Money amount, Currency destinationCurrency) throws IllegalArgumentException;
japod@6
    18
}