CurrencyExchangeRate

case class CurrencyExchangeRate(base: Money, counter: Money) extends Ratio[Money, Money]

Represent the rate of exchange between two currencies

Represent the rate of exchange between two currencies

Value Params
base

the base or "Fixed" currency (usually a value of 1 currency unit, but not required)

counter

the counter or "Variable" currency

Authors

garyKeorkunian

Since

0.1

trait Serializable
trait Product
trait Equals
trait Ratio[Money, Money]
class Object
trait Matchable
class Any

Value members

Concrete methods

def *(money: Money): Money

convert

convert

def convert(money: Money): Money

Converts the given money into the other currency of this exchange rate

Converts the given money into the other currency of this exchange rate

Value Params
money

Money

override def convertToBase(m: Money): Money

Override methods from Ratio to ensure BigDecimal precision math is applied

Override methods from Ratio to ensure BigDecimal precision math is applied

Value Params
m

Money

Definition Classes
override def convertToCounter(m: Money): Money
Definition Classes
def rate: Double
Returns

Double the rate = counter / base

override def toString: String

Returns the rate formatted in as standard FX Quote"

Returns the rate formatted in as standard FX Quote"

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product