squants.market

Price

case class Price[A <: Quantity[A]](money: Money, quantity: A) extends Ratio[Money, A] with Serializable with Product

Represents a price

A price is an squants.Ratio between a quantity of squants.market.Money and some other squants.Quantity

A

Quantity Type

money

Money

quantity

Quantity

Source
Price.scala
Since

0.1

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Price
  2. Product
  3. Equals
  4. Serializable
  5. Serializable
  6. Ratio
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Price(money: Money, quantity: A)

    money

    Money

    quantity

    Quantity

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def *(that: A): Money

    Returns the Cost (Money) for a quantity that of A

    Returns the Cost (Money) for a quantity that of A

    that

    Quantity

    returns

  5. def *(that: BigDecimal): Price[A]

  6. def *(that: Double): Price[A]

  7. def +(that: Price[A]): Price[A]

  8. def -(that: Price[A]): Price[A]

  9. def /(that: Price[A]): BigDecimal

  10. def /(that: BigDecimal): Price[A]

  11. def /(that: Double): Price[A]

  12. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  14. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  15. def base: Money

    Definition Classes
    PriceRatio
  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def convertToBase(q: A): Money

    Definition Classes
    Ratio
  18. def convertToCounter(q: Money): A

    Definition Classes
    Ratio
  19. def counter: A

    Definition Classes
    PriceRatio
  20. def divide(that: Price[A]): BigDecimal

  21. def divide(that: BigDecimal): Price[A]

  22. def divide(that: Double): Price[A]

  23. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  26. def in(currency: Currency)(implicit moneyContext: MoneyContext): Price[A]

  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def minus(that: Price[A]): Price[A]

  29. val money: Money

    Money

  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def plus(that: Price[A]): Price[A]

  34. val quantity: A

    Quantity

  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  36. def times(that: BigDecimal): Price[A]

  37. def times(that: Double): Price[A]

  38. def toString(currency: Currency, unit: UnitOfMeasure[A])(implicit moneyContext: MoneyContext): String

  39. def toString(unit: UnitOfMeasure[A]): String

  40. def toString(): String

    Definition Classes
    Price → AnyRef → Any
  41. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def *(that: Money): A

    Returns the Quantity that will cost that)

    Returns the Quantity that will cost that)

    that

    Money

    returns

    Annotations
    @deprecated
    Deprecated

    (Since version 0.6.3) Use money / price instead

Inherited from Product

Inherited from Equals

Inherited from Serializable

Inherited from Serializable

Inherited from Ratio[Money, A]

Inherited from AnyRef

Inherited from Any

Ungrouped