task4/solution02/src/org/apidesign/apifest08/currency/Money.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 11 Oct 2008 23:38:46 +0200
changeset 61 58ec6da75f6f
parent 45 task3/solution02/src/org/apidesign/apifest08/currency/Money.java@251d0ed461fb
permissions -rw-r--r--
Copying structure for task4
     1 package org.apidesign.apifest08.currency;
     2 
     3 import java.math.BigDecimal;
     4 import java.util.Currency;
     5 
     6 /**
     7  * Money representation. Default implementation {@link MoneyImpl} is provided. This interface can
     8  * be implemented by a DTO used in client application.
     9  * @author lukas
    10  *
    11  */
    12 /*
    13  * Whether we need such interface depends on the context. I can imagine than in a desktop application this interface 
    14  * would be useless, Money could be a class. In J2EE environment it can be useful.
    15  */
    16 public interface Money {
    17 
    18 	/**
    19 	 * Returns amount.
    20 	 * @return
    21 	 */
    22 	public BigDecimal getAmount();
    23 
    24 	/**
    25 	 * Returns currency.
    26 	 */
    27 	public Currency getCurrency();
    28 
    29 }