task1/solution02/src/org/apidesign/apifest08/currency/Money.java
author japod@localhost
Tue, 30 Sep 2008 11:47:02 +0200
changeset 16 2864c6d744c0
parent 6 97662396c0fd
permissions -rw-r--r--
solution 02 updated to 1.5
     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 }