task1/solution10/src/org/apidesign/apifest08/currency/CurrencyNotAvailableException.java
author japod@localhost
Sun, 28 Sep 2008 14:12:38 +0200
changeset 6 97662396c0fd
permissions -rw-r--r--
Adding solutions received for task1
     1 package org.apidesign.apifest08.currency;
     2 
     3 import java.util.*;
     4 
     5 public final class CurrencyNotAvailableException extends RuntimeException {
     6 
     7 	private final Currency currency;
     8 
     9 	CurrencyNotAvailableException(Currency currency) {
    10 		this(currency, String.format("Currency %1$s not available", currency));	
    11 	}
    12 
    13 	CurrencyNotAvailableException(Currency currency, String message) {
    14 		super(message);
    15 		this.currency = currency;
    16 	}
    17 
    18 	public Currency getCurrency() {
    19 		return currency;
    20 	}
    21 }