java.io.Serializable
public class CurrencyMismatchException
extends java.lang.IllegalArgumentException
For example, this exception would be thrown when trying to add a monetary value in one currency to a monetary value in a different currency.
This exception makes no guarantees about immutability or thread-safety.
Constructor | Description |
---|---|
CurrencyMismatchException(CurrencyUnit firstCurrency,
CurrencyUnit secondCurrency) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
CurrencyUnit |
getFirstCurrency() |
Gets the first currency at fault.
|
CurrencyUnit |
getSecondCurrency() |
Gets the second currency at fault.
|
public CurrencyMismatchException(CurrencyUnit firstCurrency, CurrencyUnit secondCurrency)
firstCurrency
- the first currency, may be nullsecondCurrency
- the second currency, not nullpublic CurrencyUnit getFirstCurrency()
public CurrencyUnit getSecondCurrency()
Copyright © 2009–2018 Joda.org. All rights reserved.