task4/solution06/src/org/apidesign/apifest08/currency/UnsupportedConversionException.java
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/task4/solution06/src/org/apidesign/apifest08/currency/UnsupportedConversionException.java Sat Oct 11 23:38:46 2008 +0200
1.3 @@ -0,0 +1,27 @@
1.4 +package org.apidesign.apifest08.currency;
1.5 +
1.6 +import java.util.Currency;
1.7 +
1.8 +public final class UnsupportedConversionException extends ConversionException{
1.9 +
1.10 + private static final long serialVersionUID = 1L;
1.11 +
1.12 + private Currency from;
1.13 + private Currency to;
1.14 +
1.15 + public UnsupportedConversionException(Currency from, Currency to) {
1.16 + super("Conversion from the currency " + from + " to the currency " + to + " or vice versa in not supported.");
1.17 + this.from = from;
1.18 + this.to = to;
1.19 + }
1.20 +
1.21 + public Currency getFrom() {
1.22 + return from;
1.23 + }
1.24 +
1.25 + public Currency getTo() {
1.26 + return to;
1.27 + }
1.28 +
1.29 +
1.30 +}