BagSortedMap

case
class BagSortedMap[A](smap: SortedMap[A, Int])(implicit evidence$1: Ordering[A]) extends Bag[A]
Companion
object
trait Serializable
trait Product
trait Equals
trait Bag[A]
class Object
trait Matchable
class Any

Value members

Concrete methods

override
def add(elem: A, n: Int): BagSortedMap[A]

A more efficient version of add

A more efficient version of add

Definition Classes
def asSortedMap: SortedMap[A, Int]
def contains(elem: A): Boolean
def delete(elem: A): BagSortedMap[A]
def elems: Iterator[(A, Int)]
def insert(elem: A): BagSortedMap[A]
def multiplicity(elem: A): Int
override
def toString: String
Definition Classes
Any

Inherited methods

override
def equals(other: Any): Boolean
Definition Classes
Bag -> Any
Inherited from
Bag
def from(t: Iterable[A]): Bag[A]
Inherited from
Bag
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product
def size: Int

Size returns the total number of elements. Notice that if an element appears 4 times, it adds 4 to the counter

Size returns the total number of elements. Notice that if an element appears 4 times, it adds 4 to the counter

Inherited from
Bag
def toSeq: Seq[A]
Inherited from
Bag
def union(other: Bag[A]): Bag[A]

Union of two bags

Union of two bags

Inherited from
Bag