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
     1 package org.apidesign.apifest08.currency;
     2 
     3 /**
     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
     6  * to the primary.
     7  */
     8 public interface Convertor {
     9 
    10     /**
    11      * Convert amount of primary currency into secondary currency
    12      *
    13      * @param amount the amount in the primary currency
    14      * @return an amount in the secondary currency
    15      */
    16     Amount convert(Amount primaryAmount);
    17 
    18     /**
    19      * Convert amount of secondary currency back into primary currency
    20      *
    21      * @param amount the amount in the secondary currency
    22      * @return an amount in the primary currency
    23      */
    24     Amount convertBack(Amount secondaryAmount);
    25 }