Currency used when none is supplied to the Money factory
Collection of Exchange Rates used for currency conversions
Adds two money values that may or may not be in the same currency.
Adds two money values that may or may not be in the same currency.
The result will be in the same currency as the first parameter.
Money A
Money B
NoSuchExchangeRateException
when no exchange rate is available
Performs a standard compare on two money values that may or may not be in the same currency
Performs a standard compare on two money values that may or may not be in the same currency
Money A
Money B
NoSuchExchangeRateException
when no exchange rate is available
Converts a Money value to the specified currency.
Converts a Money value to the specified currency.
The conversion first attempts to use an existing exchange rate for the two currencies in question. If no direct exchange works, a cross rate (limited to 1 hop) will be calculated and used. If no cross rate can be calculated a NoSuchElementException is thrown
Money to be converted
Currency to be converted to
NoSuchExchangeRateException
when no exchange rate is available
Currency used when none is supplied to the Money factory
Returns an Option on an exchange rate if a direct rate exists, otherwise None
Returns an Option on an exchange rate if a direct rate exists, otherwise None
Currency A
Currency B
Divides two money value that may or may not be in the same currency after converting the second to the first
Divides two money value that may or may not be in the same currency after converting the second to the first
Money A
Money B
Return an Option on an exchange rate.
Return an Option on an exchange rate. If a direct rate exists an Option on that will be returned. Otherwise, if a cross rate can be determined (1 hop limit), it will be created and returned in an Option. Otherwise, None will be returned
Currency A
Currency B
Collection of Exchange Rates used for currency conversions
Subtracts two money values that may or may not be in the same currency
Subtracts two money values that may or may not be in the same currency
The result will be in the same currency as the first parameter.
Money A
Money B
NoSuchExchangeRateException
when no exchange rate is available
Custom implementation using SortedSets to ensure consistent output
Custom implementation using SortedSets to ensure consistent output
String representation of this instance
Create a copy of this context with additional currencies added to the existing set
Create a copy of this context with additional currencies added to the existing set
Set[Currency]
Create a copy of this context with a new list of rates
Create a copy of this context with a new list of rates
List[CurrencyExchangeRate]
MoneyContext
Provides a context for Money specific operations.
When provided as an implicit parameter, the defaultCurrency will be used by the Money factory when no other currency is provided.
Provides for cross-currency conversions.
Will act as an implicit parameter to cross currency operations to allow for easy conversions
Currency used when none is supplied to the Money factory
Collection of Exchange Rates used for currency conversions
0.1