Packages

trait Bag[A] extends AnyRef

Source
Bag.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Bag
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def asSortedMap: SortedMap[A, Int]
  2. abstract def contains(elem: A): Boolean

    Check if a bag contains an element

  3. abstract def delete(elem: A): Bag[A]

    Deletes an element and returns the new bag It doesn't complain if the element doesn't exist

  4. abstract def elems: Iterator[(A, Int)]

    Elements of a Bag with their multiplicity

  5. abstract def insert(elem: A): Bag[A]

    Inserts an element in a bag and returns the new bag

  6. abstract def multiplicity(elem: A): Int

    Multiplicity of an element in a bag

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def add(elem: A, n: Int): Bag[A]

    add an element n times to a bag This default implementation is not efficient, it should be overridden

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(other: Any): Boolean
    Definition Classes
    Bag → AnyRef → Any
  9. def from(t: Iterable[A]): Bag[A]
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def size: Int

    Size returns the total number of elements.

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

  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toSeq: Seq[A]
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. def union(other: Bag[A]): Bag[A]

    Union of two bags

  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped