All Packages Class Hierarchy This Package Previous Next Index
Class com.roguewave.money.currency.v1_0.MismatchedCurrenciesException
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----com.roguewave.money.currency.v1_0.MoneyException
|
+----com.roguewave.money.currency.v1_0.MismatchedCurrenciesException
- public class MismatchedCurrenciesException
- extends MoneyException
A MismatchedCurrenciesException
occurs whenever an operation is
attempted between two Money
objects without using the
MoneyCalculator
.
- Author:
- Trevor Misfeldt
- See Also:
- MoneyException
-
DEFAULT_MESSAGE
-
-
MismatchedCurrenciesException(short, String, String)
- Creates a new exception with operation type, the two mismatched currencies
and a default error message.
-
MismatchedCurrenciesException(short, String, String, String)
- Creates a new exception with operation type, the two mismatched currencies
and a default error message.
-
getCurrency1()
- Returns the first currency in the operation.
-
getCurrency2()
- Returns the second currency in the operation.
-
toString()
- Returns a string representation of this exception including an error message, the operation and
the two currencies involved.
DEFAULT_MESSAGE
public static String DEFAULT_MESSAGE
MismatchedCurrenciesException
public MismatchedCurrenciesException(short operation,
String currency1,
String currency2)
- Creates a new exception with operation type, the two mismatched currencies
and a default error message.
- Parameters:
- operation - the type of operation attempted
- currency1 - the first currency mnemonic
- currency2 - the second currency mnemonic
- See Also:
- DEFAULT_MESSAGE, EXCHANGE, ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION, Currency
MismatchedCurrenciesException
public MismatchedCurrenciesException(short operation,
String currency1,
String currency2,
String message)
- Creates a new exception with operation type, the two mismatched currencies
and a default error message.
- Parameters:
- operation - the type of operation attempted
- currency1 - the first currency mnemonic
- currency2 - the second currency mnemonic
- message - an error message
- See Also:
- EXCHANGE, ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION, Currency
getCurrency1
public String getCurrency1()
- Returns the first currency in the operation.
- Returns:
- the first currency mnemonic
- See Also:
- Currency
getCurrency2
public String getCurrency2()
- Returns the second currency in the operation.
- Returns:
- the second currency mnemonic
- See Also:
- Currency
toString
public String toString()
- Returns a string representation of this exception including an error message, the operation and
the two currencies involved.
- Returns:
- a string
- Overrides:
- toString in class MoneyException
All Packages Class Hierarchy This Package Previous Next Index