1 package org.apidesign.apifest08.currency;
3 import java.util.Currency;
7 * Converts currencies. To create an instance call {@link ConvertorFactory#createConvertor(Money, Money)}.
9 public interface Convertor {
11 * Converts amount to its equivalent in the destination currency.
13 * @param destinationCurrency
15 * @throws IllegalArgumentException if currency of the amount is not supported or if it is not possible to convert it to the destination currency.
17 public Money convert(Money amount, Currency destinationCurrency) throws IllegalArgumentException;