task2/solution05/src/org/apidesign/apifest08/currency/Convertor.java
changeset 29 f6073056b9fe
parent 6 97662396c0fd
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/task2/solution05/src/org/apidesign/apifest08/currency/Convertor.java	Wed Oct 01 10:43:05 2008 +0200
     1.3 @@ -0,0 +1,25 @@
     1.4 +package org.apidesign.apifest08.currency;
     1.5 +
     1.6 +/**
     1.7 + * Convertor is an interface reprezenting a convertor between currencies.
     1.8 + * It's able to convert one currency to the second one and back from the second one
     1.9 + * to the primary.
    1.10 + */
    1.11 +public interface Convertor {
    1.12 +
    1.13 +    /**
    1.14 +     * Convert amount of primary currency into secondary currency
    1.15 +     *
    1.16 +     * @param amount the amount in the primary currency
    1.17 +     * @return an amount in the secondary currency
    1.18 +     */
    1.19 +    Amount convert(Amount primaryAmount);
    1.20 +
    1.21 +    /**
    1.22 +     * Convert amount of secondary currency back into primary currency
    1.23 +     *
    1.24 +     * @param amount the amount in the secondary currency
    1.25 +     * @return an amount in the primary currency
    1.26 +     */
    1.27 +    Amount convertBack(Amount secondaryAmount);
    1.28 +}