Bag

world.money.pricing$package.Bag
object Bag

Construction and per-currency totals for Bag.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Bag.type

Members list

Value members

Concrete methods

def added(b: Bag, v: Value): Bag

The bag with v added to its currency's running total.

The bag with v added to its currency's running total.

Attributes

def added[C <: Currency & Singleton](b: Bag, m: Money[C])(using c: ValueOf[C]): Bag
def apply(values: Value*): Bag
def merged(b: Bag, o: Bag): Bag
def total(b: Bag, c: Currency): Value

The total for one currency; zero when the bag holds none of it.

The total for one currency; zero when the bag holds none of it.

Attributes

Concrete fields

val empty: Bag

Givens

Givens

given given_CanEqual_Bag_Bag: CanEqual[Bag, Bag]

Extensions

Extensions

extension (b: Bag)
def +(v: Value): Bag
def +[C <: Currency & Singleton](m: Money[C])(using ValueOf[C]): Bag
def ++(o: Bag): Bag
def apply(c: Currency): Value
def currencies: Set[Currency]
def isEmpty: Boolean
def values: Vector[Value]

Every held total, code-ordered for determinism.

Every held total, code-ordered for determinism.

Attributes