1 package org.apidesign.apifest08.currency;
4 * Convertor is an interface reprezenting a convertor between currencies.
5 * It's able to convert one currency to the second one and back from the second one
8 public interface Convertor {
11 * Convert amount of primary currency into secondary currency
13 * @param amount the amount in the primary currency
14 * @return an amount in the secondary currency
16 Amount convert(Amount primaryAmount);
19 * Convert amount of secondary currency back into primary currency
21 * @param amount the amount in the secondary currency
22 * @return an amount in the primary currency
24 Amount convertBack(Amount secondaryAmount);