task3/solution02/src/org/apidesign/apifest08/currency/Convertor.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 07 Oct 2008 11:05:34 +0200
changeset 45 251d0ed461fb
parent 29 task2/solution02/src/org/apidesign/apifest08/currency/Convertor.java@f6073056b9fe
permissions -rw-r--r--
Copying all solution that advanced into round #3 into task3 directory
     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 }