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
japod@6
     1
package org.apidesign.apifest08.currency;
japod@6
     2
japod@6
     3
import java.math.BigDecimal;
japod@6
     4
import java.util.Currency;
japod@6
     5
japod@6
     6
/**
japod@6
     7
 * Money representation. Default implementation {@link MoneyImpl} is provided. This interface can
japod@6
     8
 * be implemented by a DTO used in client application.
japod@6
     9
 * @author lukas
japod@6
    10
 *
japod@6
    11
 */
japod@6
    12
/*
japod@16
    13
 * Whether we need such interface depends on the context. I can imagine than in a desktop application this interface 
japod@6
    14
 * would be useless, Money could be a class. In J2EE environment it can be useful.
japod@6
    15
 */
japod@6
    16
public interface Money {
japod@6
    17
japod@6
    18
	/**
japod@6
    19
	 * Returns amount.
japod@6
    20
	 * @return
japod@6
    21
	 */
japod@6
    22
	public BigDecimal getAmount();
japod@6
    23
japod@6
    24
	/**
japod@6
    25
	 * Returns currency.
japod@6
    26
	 */
japod@6
    27
	public Currency getCurrency();
japod@6
    28
japod@6
    29
}