task2/solution05/src/org/apidesign/apifest08/currency/Convertor.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 01 Oct 2008 10:43:05 +0200
changeset 29 f6073056b9fe
parent 6 task1/solution05/src/org/apidesign/apifest08/currency/Convertor.java@97662396c0fd
permissions -rw-r--r--
Getting ready for task2: copying all solutions to new locations
japod@6
     1
package org.apidesign.apifest08.currency;
japod@6
     2
japod@6
     3
/**
japod@6
     4
 * Convertor is an interface reprezenting a convertor between currencies.
japod@6
     5
 * It's able to convert one currency to the second one and back from the second one
japod@6
     6
 * to the primary.
japod@6
     7
 */
japod@6
     8
public interface Convertor {
japod@6
     9
japod@6
    10
    /**
japod@6
    11
     * Convert amount of primary currency into secondary currency
japod@6
    12
     *
japod@6
    13
     * @param amount the amount in the primary currency
japod@6
    14
     * @return an amount in the secondary currency
japod@6
    15
     */
japod@6
    16
    Amount convert(Amount primaryAmount);
japod@6
    17
japod@6
    18
    /**
japod@6
    19
     * Convert amount of secondary currency back into primary currency
japod@6
    20
     *
japod@6
    21
     * @param amount the amount in the secondary currency
japod@6
    22
     * @return an amount in the primary currency
japod@6
    23
     */
japod@6
    24
    Amount convertBack(Amount secondaryAmount);
japod@6
    25
}