task2/solution06/src/org/apidesign/apifest08/currency/UnsupportedConversionException.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 01 Oct 2008 10:43:05 +0200
changeset 29 f6073056b9fe
parent 21 task1/solution06/src/org/apidesign/apifest08/currency/UnsupportedConversionException.java@61e4c4c120fd
permissions -rw-r--r--
Getting ready for task2: copying all solutions to new locations
     1 package org.apidesign.apifest08.currency;
     2 
     3 import java.util.Currency;
     4 
     5 public final class UnsupportedConversionException extends ConversionException{
     6 
     7 	private static final long serialVersionUID = 1L; 
     8 	
     9 	private Currency from;
    10 	private Currency to;
    11 
    12 	public UnsupportedConversionException(Currency from, Currency to) {
    13 		super("Conversion from  the currency " + from + " to the currency " + to + " or vice versa in not supported.");
    14 		this.from = from;
    15 		this.to = to;
    16 	}
    17 
    18 	public Currency getFrom() {
    19 		return from;
    20 	}
    21 
    22 	public Currency getTo() {
    23 		return to;
    24 	}
    25 	
    26 	
    27 }