case class CurrencyExchangeRate(base: Money, counter: Money) extends Ratio[Money, Money] with Product with Serializable
Represent the rate of exchange between two currencies
- base
the base or "Fixed" currency (usually a value of 1 currency unit, but not required)
- counter
the counter or "Variable" currency
- Source
- CurrencyExchangeRate.scala
- Since
0.1
- Alphabetic
- By Inheritance
- CurrencyExchangeRate
- Serializable
- Product
- Equals
- Ratio
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- def *(money: Money): Money
convert
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val base: Money
- Definition Classes
- CurrencyExchangeRate → Ratio
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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
- money
Money
- 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
- m
Money
- Definition Classes
- CurrencyExchangeRate → Ratio
- def convertToCounter(m: Money): Money
- Definition Classes
- CurrencyExchangeRate → Ratio
- val counter: Money
- Definition Classes
- CurrencyExchangeRate → Ratio
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def rate: Double
- returns
Double the rate = counter / base
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
Returns the rate formatted in as standard FX Quote"
Returns the rate formatted in as standard FX Quote"
- Definition Classes
- CurrencyExchangeRate → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()