SortedMultiSetOps

scala.collection.SortedMultiSetOps
See theSortedMultiSetOps companion object
trait SortedMultiSetOps[A, +CC <: (MultiSet), +C <: MultiSet[A]] extends MultiSetOps[A, MultiSet, C] with SortedOps[A, C]

Attributes

Companion:
object
Graph
Supertypes
trait SortedOps[A, C]
trait MultiSetOps[A, MultiSet, C]
trait IterableOps[A, MultiSet, C]
trait IterableOnceOps[A, MultiSet, C]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Value members

Abstract methods

def occurrences: SortedMap[A, Int]

Attributes

Returns:

All the elements contained in this multiset and their number of occurrences

def sortedIterableFactory: SortedIterableFactory[CC]

this sorted multiset upcasted to an unsorted multiset

this sorted multiset upcasted to an unsorted multiset

Attributes

Concrete methods

def collect[B : Ordering](pf: PartialFunction[A, B]): CC[B]

Attributes

B

the element type of the returned collection

pf

the partial function which filters and map this sorted multiset

Returns:

a new collection resulting from applying the given partial function pf to each element on which it is defined and collecting the results

def collectOccurrences[B : Ordering](pf: PartialFunction[(A, Int), (B, Int)]): CC[B]

Attributes

B

the element type of the returned collection

pf

the partial function which filters and map this sorted multiset

Returns:

a new collection resulting from applying the given partial function pf to each group of occurrences on which it is defined and collecting the results

def firstKey: A
def flatMap[B : Ordering](f: A => IterableOnce[B]): CC[B]

Builds a new collection by applying a function to all elements of this sorted multiset and using the elements of the resulting collections.

Builds a new collection by applying a function to all elements of this sorted multiset and using the elements of the resulting collections.

Attributes

B

the element type of the returned collection.

f

the function to apply to each element.

Returns:

a new collection resulting from applying the given function f to each element of this sorted multiset and concatenating the results.

def flatMapOccurrences[B : Ordering](f: ((A, Int)) => IterableOnce[(B, Int)]): CC[B]

Builds a new collection by applying a function to all pairs of element and its number of occurrences of this sorted multiset and using the elements of the resulting collections.

Builds a new collection by applying a function to all pairs of element and its number of occurrences of this sorted multiset and using the elements of the resulting collections.

Attributes

B

the element type of the returned collection.

f

the function to apply to each element.

Returns:

a new collection resulting from applying the given function f to each pair of element and its number of occurrences of this sorted multiset and concatenating the results.

def iteratorFrom(start: A): Iterator[A]

Creates an iterator that contains all values from this collection greater than or equal to start according to the ordering of this collection. x.iteratorFrom(y) is equivalent to but will usually be more efficient than x.from(y).iterator

Creates an iterator that contains all values from this collection greater than or equal to start according to the ordering of this collection. x.iteratorFrom(y) is equivalent to but will usually be more efficient than x.from(y).iterator

Attributes

start

The lower-bound (inclusive) of the iterator

def lastKey: A
def map[B : Ordering](f: A => B): CC[B]

Builds a new sorted multiset by applying a function to all elements of this sorted multiset.

Builds a new sorted multiset by applying a function to all elements of this sorted multiset.

Attributes

B

the element type of the returned collection.

f

the function to apply to each element.

Returns:

a new collection resulting from applying the given function f to each element of this sorted multiset and collecting the results.

def mapOccurrences[B : Ordering](f: ((A, Int)) => (B, Int)): CC[B]

Builds a new sorted multiset by applying a function to all pairs of element and its number of occurrences.

Builds a new sorted multiset by applying a function to all pairs of element and its number of occurrences.

Attributes

B

the element type of the returned collection

f

the function to apply

Returns:

a new collection resulting from applying the given function f to each pair of element and its number of occurrences of this sorted multiset and collecting the results.

def rangeTo(to: A): C
def zip[B](that: Iterable[B])(implicit ev: Ordering[B]): CC[(A, B)]

Returns a sorted multiset formed from this sorted multiset and another iterable collection, by combining corresponding elements in pairs.

Returns a sorted multiset formed from this sorted multiset and another iterable collection, by combining corresponding elements in pairs.

Attributes

B

the type of the second half of the returned pairs

ev

The ordering instance for type B

that

The iterable providing the second half of each result pair

Returns:

a new sorted multiset containing pairs consisting of corresponding elements of this sorted multiset and that. The length of the returned collection is the minimum of the lengths of this and that

override def zipWithIndex: CC[(A, Int)]

Attributes

Definition Classes
IterableOps -> IterableOnceOps

Inherited methods

final def ++[B >: A](suffix: IterableOnce[B]): CC[B]

Attributes

Inherited from:
IterableOps
final def addString(b: StringBuilder): StringBuilder

Attributes

Inherited from:
IterableOnceOps
final def addString(b: StringBuilder, sep: String): StringBuilder

Attributes

Inherited from:
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

Attributes

Inherited from:
IterableOnceOps
def collect[B](pf: PartialFunction[A, B]): CC[B]

Attributes

Inherited from:
IterableOps
def collectFirst[B](pf: PartialFunction[A, B]): Option[B]

Attributes

Inherited from:
IterableOnceOps
def collectOccurrences[B](pf: PartialFunction[(A, Int), (B, Int)]): CC[B]

Attributes

Inherited from:
MultiSetOps
def concat(that: IterableOnce[A]): C

Attributes

that

the collection of elements to add to this multiset

Returns:

a new multiset summing the occurrences of this multiset with the elements of that

Inherited from:
MultiSetOps
def concat[B >: A](suffix: IterableOnce[B]): CC[B]

Attributes

Inherited from:
IterableOps
def concatOccurrences(that: Iterable[(A, Int)]): C

Attributes

that

the collection of occurrences to add to this multiset

Returns:

a new multiset summing the occurrences of this multiset and that collection of occurrences

Inherited from:
MultiSetOps
def contains(elem: A): Boolean

Attributes

elem

the element to test

Returns:

Whether elem has at least one occurrence in this multiset or not

Inherited from:
MultiSetOps
def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: A](xs: Array[B], start: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: A](xs: Array[B]): Int

Attributes

Inherited from:
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: (A, B) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def count(p: A => Boolean): Int

Attributes

Inherited from:
IterableOnceOps
def drop(n: Int): C

Attributes

Inherited from:
IterableOps
def dropRight(n: Int): C

Attributes

Inherited from:
IterableOps
def dropWhile(p: A => Boolean): C

Attributes

Inherited from:
IterableOps
def empty: C

Attributes

Inherited from:
IterableOps
def exists(p: A => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def filter(pred: A => Boolean): C

Attributes

Inherited from:
IterableOps
def filterNot(pred: A => Boolean): C

Attributes

Inherited from:
IterableOps
def filterOccurrences(p: ((A, Int)) => Boolean): C

Attributes

Returns:

a new multiset containing only the occurrences of elements of this multiset that satisfy the given predicate p

Inherited from:
MultiSetOps
def find(p: A => Boolean): Option[A]

Attributes

Inherited from:
IterableOnceOps
def flatMap[B](f: A => IterableOnce[B]): CC[B]

Attributes

Inherited from:
IterableOps
def flatMapOccurrences[B](f: ((A, Int)) => IterableOnce[(B, Int)]): CC[B]

Attributes

B

the element type of the returned collection

f

the function to apply

Returns:

a new multiset resulting from applying the given function f to each pair of element and its number of occurrences of this multiset and concatenating the results

Inherited from:
MultiSetOps
def flatten[B](implicit asIterable: A => IterableOnce[B]): CC[B]

Attributes

Inherited from:
IterableOps
def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1

Attributes

Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, A) => B): B

Attributes

Inherited from:
IterableOnceOps
def foldRight[B](z: B)(op: (A, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def forall(p: A => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def foreach[U](f: A => U): Unit

Attributes

Inherited from:
IterableOnceOps
def get(elem: A): Int

Attributes

elem

Element to look up

Returns:

The number of occurrences of elem in this multiset

Inherited from:
MultiSetOps
def groupBy[K](f: A => K): Map[K, C]

Attributes

Inherited from:
IterableOps
def groupMap[K, B](key: A => K)(f: A => B): Map[K, CC[B]]

Attributes

Inherited from:
IterableOps
def groupMapReduce[K, B](key: A => K)(f: A => B)(reduce: (B, B) => B): Map[K, B]

Attributes

Inherited from:
IterableOps
def grouped(size: Int): Iterator[C]

Attributes

Inherited from:
IterableOps
def head: A

Attributes

Inherited from:
IterableOps
def headOption: Option[A]

Attributes

Inherited from:
IterableOps
def init: C

Attributes

Inherited from:
IterableOps
def inits: Iterator[C]

Attributes

Inherited from:
IterableOps
def isEmpty: Boolean

Attributes

Inherited from:
IterableOnceOps
override def isTraversableAgain: Boolean

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def iterableFactory: IterableFactory[CC]

Attributes

Inherited from:
IterableOps
def iterator: Iterator[A]

Attributes

Inherited from:
MultiSetOps
def knownSize: Int

Attributes

Inherited from:
IterableOnce
def last: A

Attributes

Inherited from:
IterableOps
def lastOption: Option[A]

Attributes

Inherited from:
IterableOps
def map[B](f: A => B): CC[B]

Attributes

Inherited from:
IterableOps
def mapOccurrences[B](f: ((A, Int)) => (B, Int)): CC[B]

Attributes

B

the element type of the returned collection

f

the function to apply

Returns:

a new multiset resulting from applying the given function f to each pair of element and its number of occurrences of this multiset and collecting the results

Inherited from:
MultiSetOps
def max[B >: A](implicit ord: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def maxBy[B](f: A => B)(implicit cmp: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def maxByOption[B](f: A => B)(implicit cmp: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
def maxOption[B >: A](implicit ord: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
def min[B >: A](implicit ord: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def minBy[B](f: A => B)(implicit cmp: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def minByOption[B](f: A => B)(implicit cmp: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
def minOption[B >: A](implicit ord: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
final def mkString: String

Attributes

Inherited from:
IterableOnceOps
final def mkString(sep: String): String

Attributes

Inherited from:
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String

Attributes

Inherited from:
IterableOnceOps
def nonEmpty: Boolean

Attributes

Inherited from:
IterableOnceOps
def ordering: Ordering[A]

Attributes

Inherited from:
SortedOps
def partition(p: A => Boolean): (C, C)

Attributes

Inherited from:
IterableOps
def partitionMap[A1, A2](f: A => Either[A1, A2]): (CC[A1], CC[A2])

Attributes

Inherited from:
IterableOps
def product[B >: A](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def range(from: A, until: A): C

Attributes

Inherited from:
SortedOps
def rangeFrom(from: A): C

Attributes

Inherited from:
SortedOps
def rangeImpl(from: Option[A], until: Option[A]): C

Attributes

Inherited from:
SortedOps
def rangeUntil(until: A): C

Attributes

Inherited from:
SortedOps
def reduce[B >: A](op: (B, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeft[B >: A](op: (B, A) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceOption[B >: A](op: (B, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceRight[B >: A](op: (A, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceRightOption[B >: A](op: (A, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
protected def reversed: Iterable[A]

Attributes

Inherited from:
IterableOnceOps
def scan[B >: A](z: B)(op: (B, B) => B): CC[B]

Attributes

Inherited from:
IterableOps
def scanLeft[B](z: B)(op: (B, A) => B): CC[B]

Attributes

Inherited from:
IterableOps
def scanRight[B](z: B)(op: (A, B) => B): CC[B]

Attributes

Inherited from:
IterableOps
def size: Int

Attributes

Inherited from:
IterableOnceOps
def sizeCompare(that: Iterable[_]): Int

Attributes

Inherited from:
IterableOps
def sizeCompare(otherSize: Int): Int

Attributes

Inherited from:
IterableOps
final def sizeIs: SizeCompareOps

Attributes

Inherited from:
IterableOps
def slice(from: Int, until: Int): C

Attributes

Inherited from:
IterableOps
def sliding(size: Int, step: Int): Iterator[C]

Attributes

Inherited from:
IterableOps
def sliding(size: Int): Iterator[C]

Attributes

Inherited from:
IterableOps
def span(p: A => Boolean): (C, C)

Attributes

Inherited from:
IterableOps
override def splitAt(n: Int): (C, C)

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S

Attributes

Inherited from:
IterableOnce
def sum[B >: A](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def tail: C

Attributes

Inherited from:
IterableOps
def tails: Iterator[C]

Attributes

Inherited from:
IterableOps
def take(n: Int): C

Attributes

Inherited from:
IterableOps
def takeRight(n: Int): C

Attributes

Inherited from:
IterableOps
def takeWhile(p: A => Boolean): C

Attributes

Inherited from:
IterableOps
override def tapEach[U](f: A => U): C

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def to[C1](factory: Factory[A, C1]): C1

Attributes

Inherited from:
IterableOnceOps
def toArray[B >: A : ClassTag]: Array[B]

Attributes

Inherited from:
IterableOnceOps
final def toBuffer[B >: A]: Buffer[B]

Attributes

Inherited from:
IterableOnceOps
def toIndexedSeq: IndexedSeq[A]

Attributes

Inherited from:
IterableOnceOps
def toList: List[A]

Attributes

Inherited from:
IterableOnceOps
def toMap[K, V](implicit ev: A <:< (K, V)): Map[K, V]

Attributes

Inherited from:
IterableOnceOps
def toSeq: Seq[A]

Attributes

Inherited from:
IterableOnceOps
def toSet[B >: A]: Set[B]

Attributes

Inherited from:
IterableOnceOps
def toVector: Vector[A]

Attributes

Inherited from:
IterableOnceOps
def transpose[B](implicit asIterable: A => Iterable[B]): CC[CC[B]]

Attributes

Inherited from:
IterableOps
def unzip[A1, A2](implicit asPair: A => (A1, A2)): (CC[A1], CC[A2])

Attributes

Inherited from:
IterableOps
def unzip3[A1, A2, A3](implicit asTriple: A => (A1, A2, A3)): (CC[A1], CC[A2], CC[A3])

Attributes

Inherited from:
IterableOps
def view: View[A]

Attributes

Inherited from:
IterableOps
def withFilter(p: A => Boolean): WithFilter[A, CC]

Attributes

Inherited from:
IterableOps
def zip[B](that: IterableOnce[B]): CC[(A, B)]

Attributes

Inherited from:
IterableOps
def zipAll[A1 >: A, B](that: Iterable[B], thisElem: A1, thatElem: B): CC[(A1, B)]

Attributes

Inherited from:
IterableOps

Deprecated and Inherited methods

def ++:[B >: A](that: IterableOnce[B]): CC[B]

Attributes

Deprecated
[Since version 2.13.0] Use ++ instead of ++: for collections of type Iterable
Inherited from:
IterableOps
final def /:[B](z: B)(op: (B, A) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
final def :\[B](z: B)(op: (A, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
def aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] `aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.
Inherited from:
IterableOnceOps
def companion: IterableFactory[CC]

Attributes

Deprecated
[Since version 2.13.0] Use iterableFactory instead
Inherited from:
IterableOps
def compare(k0: A, k1: A): Int

Attributes

Deprecated
[Since version 2.13.0] Use ordering.compare instead
Inherited from:
SortedOps
final def copyToBuffer[B >: A](dest: Buffer[B]): Unit

Attributes

Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps
final def from(from: A): C

Attributes

Deprecated
[Since version 2.13.0] Use rangeFrom
Inherited from:
SortedOps
def hasDefiniteSize: Boolean

Attributes

Deprecated
[Since version 2.13.0] Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
Inherited from:
IterableOnceOps
final def repr: C

Attributes

Deprecated
[Since version 2.13.0] Use coll instead of repr in a collection implementation, use the collection value itself from the outside
Inherited from:
IterableOps
final def to(to: A): C

Attributes

Deprecated
[Since version 2.13.0] Use rangeTo
Inherited from:
SortedOps
def toIterable: Iterable[A]

Attributes

Deprecated
[Since version 2.13.7] toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
IterableOps
final def toIterator: Iterator[A]

Attributes

Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
final def toStream: Stream[A]

Attributes

Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps
final def toTraversable: Iterable[A]

Attributes

Deprecated
[Since version 2.13.0] toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
IterableOps
final def until(until: A): C

Attributes

Deprecated
[Since version 2.13.0] Use rangeUntil
Inherited from:
SortedOps
def view(from: Int, until: Int): View[A]

Attributes

Deprecated
[Since version 2.13.0] Use .view.slice(from, until) instead of .view(from, until)
Inherited from:
IterableOps