author | japod@localhost |
Tue, 30 Sep 2008 16:11:32 +0200 | |
changeset 28 | 36331f7244bd |
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 |
} |