author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Wed, 01 Oct 2008 10:43:05 +0200 | |
changeset 29 | f6073056b9fe |
parent 6 | task1/solution10/src/org/apidesign/apifest08/currency/CurrencyNotAvailableException.java@97662396c0fd |
permissions | -rw-r--r-- |
japod@6 | 1 |
package org.apidesign.apifest08.currency; |
japod@6 | 2 |
|
japod@6 | 3 |
import java.util.*; |
japod@6 | 4 |
|
japod@6 | 5 |
public final class CurrencyNotAvailableException extends RuntimeException { |
japod@6 | 6 |
|
japod@6 | 7 |
private final Currency currency; |
japod@6 | 8 |
|
japod@6 | 9 |
CurrencyNotAvailableException(Currency currency) { |
japod@6 | 10 |
this(currency, String.format("Currency %1$s not available", currency)); |
japod@6 | 11 |
} |
japod@6 | 12 |
|
japod@6 | 13 |
CurrencyNotAvailableException(Currency currency, String message) { |
japod@6 | 14 |
super(message); |
japod@6 | 15 |
this.currency = currency; |
japod@6 | 16 |
} |
japod@6 | 17 |
|
japod@6 | 18 |
public Currency getCurrency() { |
japod@6 | 19 |
return currency; |
japod@6 | 20 |
} |
japod@6 | 21 |
} |