task4/solution06/src/org/apidesign/apifest08/currency/UnsupportedConversionException.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 11 Oct 2008 23:38:46 +0200
changeset 61 58ec6da75f6f
parent 45 task3/solution06/src/org/apidesign/apifest08/currency/UnsupportedConversionException.java@251d0ed461fb
child 64 51f7b894eba6
permissions -rw-r--r--
Copying structure for task4
japod@6
     1
package org.apidesign.apifest08.currency;
japod@6
     2
japod@6
     3
import java.util.Currency;
japod@6
     4
japod@21
     5
public final class UnsupportedConversionException extends ConversionException{
japod@6
     6
japod@6
     7
	private static final long serialVersionUID = 1L; 
japod@6
     8
	
japod@6
     9
	private Currency from;
japod@6
    10
	private Currency to;
japod@6
    11
japod@6
    12
	public UnsupportedConversionException(Currency from, Currency to) {
japod@21
    13
		super("Conversion from  the currency " + from + " to the currency " + to + " or vice versa in not supported.");
japod@6
    14
		this.from = from;
japod@6
    15
		this.to = to;
japod@6
    16
	}
japod@6
    17
japod@6
    18
	public Currency getFrom() {
japod@6
    19
		return from;
japod@6
    20
	}
japod@6
    21
japod@6
    22
	public Currency getTo() {
japod@6
    23
		return to;
japod@6
    24
	}
japod@6
    25
	
japod@6
    26
	
japod@6
    27
}