japod@6
|
1 |
package org.apidesign.apifest08.currency;
|
japod@6
|
2 |
|
japod@6
|
3 |
/** This is the skeleton class for your API. You need to make it public, so
|
japod@6
|
4 |
* it is accessible to your client code (currently in Task1Test.java) file.
|
japod@6
|
5 |
* <p>
|
japod@6
|
6 |
* Feel free to create additional classes or rename this one, just keep all
|
japod@6
|
7 |
* the API and its implementation in this package. Do not spread it outside
|
japod@6
|
8 |
* to other packages.
|
japod@6
|
9 |
*/
|
japod@6
|
10 |
public interface Convertor {
|
japod@6
|
11 |
|
japod@6
|
12 |
/**
|
japod@6
|
13 |
* converts amount in first currency to amount second currency.
|
japod@6
|
14 |
* @param amountInCents the amount of first currency in cents (or equivalent)
|
japod@6
|
15 |
* @return the amount in the second currency in cents (or equivalent)
|
japod@6
|
16 |
*/
|
japod@6
|
17 |
public long convertTo(long amountInCents);
|
japod@6
|
18 |
|
japod@6
|
19 |
|
japod@6
|
20 |
/**
|
japod@6
|
21 |
* converts from second currency amount to first currency amount.
|
japod@6
|
22 |
* @param amountInCents the amount of second currency in cents (or equivalent)
|
japod@6
|
23 |
* @return the amount in the first currency in cents (or equivalent)
|
japod@6
|
24 |
*/
|
japod@6
|
25 |
public long convertFrom(long amountInCents);
|
japod@6
|
26 |
}
|