task2/solution09/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/solution09/src/org/apidesign/apifest08/currency/Convertor.java	Wed Oct 01 10:43:05 2008 +0200
     1.3 @@ -0,0 +1,26 @@
     1.4 +package org.apidesign.apifest08.currency;
     1.5 +
     1.6 +/** This is the skeleton class for your API. You need to make it public, so
     1.7 + * it is accessible to your client code (currently in Task1Test.java) file.
     1.8 + * <p>
     1.9 + * Feel free to create additional classes or rename this one, just keep all
    1.10 + * the API and its implementation in this package. Do not spread it outside
    1.11 + * to other packages.
    1.12 + */
    1.13 +public interface Convertor {
    1.14 +
    1.15 +    /**
    1.16 +     * converts amount in first currency to amount second currency.
    1.17 +     * @param amountInCents the amount of first currency in cents (or equivalent)
    1.18 +     * @return the amount in the second currency in cents (or equivalent)
    1.19 +     */
    1.20 +    public long convertTo(long amountInCents);
    1.21 +
    1.22 +
    1.23 +    /**
    1.24 +     * converts from second currency amount to first currency amount.
    1.25 +     * @param amountInCents the amount of second currency in cents (or equivalent)
    1.26 +     * @return the amount in the first currency in cents (or equivalent)
    1.27 +     */
    1.28 +    public long convertFrom(long amountInCents);
    1.29 +}