scala.collection

SortedSet

trait SortedSet[A] extends Set[A] with SortedSetLike[A, SortedSet[A]]

A sorted set.

known subclasses: SortedSet

Inherits

  1. SortedSetLike
  2. Sorted
  3. Set
  4. SetLike
  5. Subtractable
  6. Addable
  7. GenericSetTemplate
  8. Iterable
  9. IterableLike
  10. Equals
  11. Traversable
  12. GenericTraversableTemplate
  13. TraversableLike
  14. HasNewBuilder
  15. Function1
  16. AnyRef
  17. Any

Type Members

  1. class WithFilter extends AnyRef

    A class supporting filtered operations

Value Members

  1. def &(that: Set[A]): SortedSet[A]

    Computes the intersection between this set and another set

  2. def &~(that: Set[A]): SortedSet[A]

    The difference of this set and another set

  3. def **(that: Set[A]): SortedSet[A]

    This method is an alias for intersect

  4. def +(elem1: A, elem2: A, elems: A*): SortedSet[A]

    Creates a new set with additional elements

  5. def +(elem: A): SortedSet[A]

    Creates a new set with an additional element, unless the element is already present

  6. def ++(iter: Iterator[A]): SortedSet[A]

    Creates a new set by adding all elements produced by an iterator to this set

  7. def ++(elems: Traversable[A]): SortedSet[A]

    Creates a new set by adding all elements contained in another collection to this set

  8. def ++[B >: A, That](that: Iterator[B])(bf: CanBuildFrom[SortedSet[A], B, That]): That

    Concatenates this set with the elements of an iterator

  9. def ++[B >: A, That](that: Traversable[B])(bf: CanBuildFrom[SortedSet[A], B, That]): That

    Concatenates this set with the elements of a traversable collection

  10. def -(elem1: A, elem2: A, elems: A*): SortedSet[A]

    Creates a new set from this set with some elements removed

  11. def -(elem: A): SortedSet[A]

    Creates a new set with a given element removed from this set

  12. def --(iter: Iterator[A]): SortedSet[A]

    Creates a new set from this set by removing all elements produced by an iterator

  13. def --(elems: Traversable[A]): SortedSet[A]

    Creates a new set from this set by removing all elements of another collection

  14. def /:[B](z: B)(op: (B, A) ⇒ B): B

    Applies a binary operator to a start value and all elements of this set, going left to right

  15. def :\[B](z: B)(op: (A, B) ⇒ B): B

    Applies a binary operator to all elements of this set and a start value, going right to left

  16. def addString(b: StringBuilder): StringBuilder

    Appends all elements of this set to a string builder

  17. def addString(b: StringBuilder, sep: String): StringBuilder

    Appends all elements of this set to a string builder using a separator string

  18. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Appends all elements of this set to a string builder using start, end, and separator strings

  19. def andThen[A](g: (Boolean) ⇒ A): (A) ⇒ A

    (f andThen g)(x) == g(f(x))

  20. def apply(elem: A): Boolean

    Tests if some element is contained in this set

  21. def canEqual(that: Any): Boolean

    Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind

  22. def companion: GenericCompanion[Set[A][A]]

    The factory companion object that builds instances of class Set

  23. def compare(k0: A, k1: A): Int

    Comparison function that orders keys

  24. def compose[A](g: (A) ⇒ A): (A) ⇒ Boolean

    (f compose g)(x) == f(g(x))

  25. def contains(elem: A): Boolean

    Tests if some element is contained in this set

  26. def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Unit

    Copies elements of this set to an array

  27. def copyToArray[B >: A](xs: Array[B]): Unit

    Copies elements of this set to an array

  28. def copyToArray[B >: A](xs: Array[B], start: Int): Unit

    Copies elements of this set to an array

  29. def copyToBuffer[B >: A](dest: Buffer[B]): Unit

    Copies all elements of this set to a buffer

  30. def count(p: (A) ⇒ Boolean): Int

    Counts the number of elements in the set which satisfy a predicate

  31. def diff(that: Set[A]): SortedSet[A]

    Computes the difference of this set and another set

  32. def drop(n: Int): SortedSet[A]

    Selects all elements except first n ones

  33. def dropRight(n: Int): SortedSet[A]

    Selects all elements except first n ones

  34. def dropWhile(p: (A) ⇒ Boolean): SortedSet[A]

    Drops longest prefix of elements that satisfy a predicate

  35. def elements: Iterator[A]

  36. def empty: SortedSet[A]

    Needs to be overridden in subclasses

  37. def equals(that: Any): Boolean

    Compares this set with another object for equality

  38. def exists(p: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for some of the elements of this set

  39. def filter(p: (A) ⇒ Boolean): SortedSet[A]

    Selects all elements of this set which satisfy a predicate

  40. def filterNot(p: (A) ⇒ Boolean): SortedSet[A]

    Selects all elements of this set which do not satisfy a predicate

  41. def find(p: (A) ⇒ Boolean): Option[A]

    Finds the first element of the set satisfying a predicate, if any

  42. def first: A

  43. def firstKey: A

    Returns the first key of the collection

  44. def firstOption: Option[A]

    None if iterable is empty

  45. def flatMap[B, That](f: (A) ⇒ Traversable[B])(bf: CanBuildFrom[SortedSet[A], B, That]): That

    Builds a new collection by applying a function to all elements of this set and concatenating the results

  46. def flatten[B](asTraversable: (A) ⇒ Traversable[B]): Set[B]

    Converts this set of traversable collections into a set in which all element collections are concatenated

  47. def foldLeft[B](z: B)(op: (B, A) ⇒ B): B

    Applies a binary operator to a start value and all elements of this set, going left to right

  48. def foldRight[B](z: B)(op: (A, B) ⇒ B): B

    Applies a binary operator to all elements of this set and a start value, going right to left

  49. def forall(p: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for all elements of this set

  50. def foreach[U](f: (A) ⇒ U): Unit

    Applies a function f to all elements of this set

  51. def from(from: A): SortedSet[A]

    Creates a ranged projection of this collection with no upper-bound

  52. def genericBuilder[B]: Builder[B, Set[B]]

    The generic builder that builds instances of Set at arbitrary element types

  53. def groupBy[K](f: (A) ⇒ K): Map[K, SortedSet[A]]

    Partitions this set into a map of sets according to some discriminator function

  54. def hasDefiniteSize: Boolean

    Tests whether this set is known to have a finite size

  55. def hashCode(): Int

    Returns a hash code value for the object

  56. def head: A

    Selects the first element of this set

  57. def headOption: Option[A]

    Optionally selects the first element

  58. def init: SortedSet[A]

    Selects all elements except the last

  59. def intersect(that: Set[A]): SortedSet[A]

    Computes the intersection between this set and another set

  60. def isEmpty: Boolean

    Tests if this set is empty

  61. def iterator: Iterator[A]

    Creates a new iterator over all elements contained in this iterable object

  62. def keySet: SortedSet[A]

    return as a projection the set of keys in this collection

  63. def last: A

    Selects the last element

  64. def lastKey: A

    Returns the last key of the collection

  65. def lastOption: Option[A]

    Optionally selects the last element

  66. def map[B, That](f: (A) ⇒ B)(bf: CanBuildFrom[SortedSet[A], B, That]): That

    Builds a new collection by applying a function to all elements of this set

  67. def max[B >: A](cmp: Ordering[B]): A

    Finds the largest element

  68. def min[B >: A](cmp: Ordering[B]): A

    Finds the smallest element

  69. def mkString: String

    Displays all elements of this set in a string

  70. def mkString(sep: String): String

    Displays all elements of this set in a string using a separator string

  71. def mkString(start: String, sep: String, end: String): String

    Displays all elements of this set in a string using start, end, and separator strings

  72. def nonEmpty: Boolean

    Tests whether the set is not empty

  73. def ordering: Ordering[A]

  74. def partialMap[B, That](pf: PartialFunction[A, B])(bf: CanBuildFrom[SortedSet[A], B, That]): That

    Builds a new collection by applying a partial function to all elements of this set on which the function is defined

  75. def partition(p: (A) ⇒ Boolean): (SortedSet[A], SortedSet[A])

    Partitions this set in two sets according to a predicate

  76. def product[B >: A](num: Numeric[B]): B

    Multiplies up the elements of this collection

  77. def projection: IterableView[A, SortedSet[A]]

    returns a projection that can be used to call non-strict filter,map, and flatMap methods that build projections of the collection

  78. def range(from: A, until: A): SortedSet[A]

    Creates a ranged projection of this collection with both a lower-bound and an upper-bound

  79. def rangeImpl(from: Option[A], until: Option[A]): SortedSet[A]

    Creates a ranged projection of this collection

  80. def reduceLeft[B >: A](op: (B, A) ⇒ B): B

    Applies a binary operator to all elements of this set, going left to right

  81. def reduceLeftOption[B >: A](op: (B, A) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this set, going left to right

  82. def reduceRight[B >: A](op: (A, B) ⇒ B): B

    Applies a binary operator to all elements of this set, going right to left

  83. def reduceRightOption[B >: A](op: (A, B) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this set, going right to left

  84. def repr: SortedSet[A]

    The collection of type set underlying this TraversableLike object

  85. def sameElements[B >: A](that: Iterable[B]): Boolean

    Checks if the other iterable collection contains the same elements in the same order as this set

  86. def size: Int

    The size of this set

  87. def slice(from: Int, until: Int): SortedSet[A]

    Selects an interval of elements

  88. def span(p: (A) ⇒ Boolean): (SortedSet[A], SortedSet[A])

    Spits this set into a prefix/suffix pair according to a predicate

  89. def splitAt(n: Int): (SortedSet[A], SortedSet[A])

    Splits this set into two at a given position

  90. def stringPrefix: String

    Defines the prefix of this object's toString representation

  91. def subsetOf(that: Set[A]): Boolean

    Tests whether this set is a subset of another set

  92. def sum[B >: A](num: Numeric[B]): B

    Sums up the elements of this collection

  93. def tail: SortedSet[A]

    Selects all elements except the first

  94. def take(n: Int): SortedSet[A]

    Selects first n elements

  95. def takeRight(n: Int): SortedSet[A]

    Selects last n elements

  96. def takeWhile(p: (A) ⇒ Boolean): SortedSet[A]

    Takes longest prefix of elements that satisfy a predicate

  97. def to(to: A): SortedSet[A]

    Create a range projection of this collection with no lower-bound

  98. def toArray[B >: A](arg0: ClassManifest[B]): Array[B]

    Converts this set to an array

  99. def toIndexedSeq[B >: A]: IndexedSeq[B]

    Converts this set to an indexed sequence

  100. def toIterable: Iterable[A]

    Converts this set to an iterable collection

  101. def toList: List[A]

    Converts this set to a list

  102. def toSeq: Seq[A]

    Converts this set to a sequence

  103. def toSet[B >: A]: Set[B]

    Converts this set to a set

  104. def toStream: Stream[A]

    Converts this set to a stream

  105. def toString(): String

    Converts this set to a string

  106. def transpose[B](asTraversable: (A) ⇒ Traversable[B]): Set[Set[B]]

    Transposes this set of traversable collections into

  107. def union(that: Set[A]): SortedSet[A]

    Computes the union between of set and another set

  108. def until(until: A): SortedSet[A]

    Creates a ranged projection of this collection with no lower-bound

  109. def unzip[A1, A2](asPair: (A) ⇒ (A1, A2)): (Set[A1], Set[A2])

    Converts this set of pairs into two collections of the first and second halfs of each pair

  110. def view(from: Int, until: Int): IterableView[A, SortedSet[A]]

    Creates a non-strict view of a slice of this set

  111. def view: IterableView[A, SortedSet[A]]

    Creates a non-strict view of this set

  112. def withFilter(p: (A) ⇒ Boolean): WithFilter

    Creates a non-strict filter of this set

  113. def zip[A1 >: A, B, That](that: Iterable[B])(bf: CanBuildFrom[SortedSet[A], (A1, B), That]): That

    Returns a set formed from this set and another iterable collection by combining corresponding elements in pairs

  114. def zipAll[B, A1 >: A, That](that: Iterable[B], thisElem: A1, thatElem: B)(bf: CanBuildFrom[SortedSet[A], (A1, B), That]): That

    Returns a set formed from this set and another iterable collection by combining corresponding elements in pairs

  115. def zipWithIndex[A1 >: A, That](bf: CanBuildFrom[SortedSet[A], (A1, Int), That]): That

    Zips this set with its indices

  116. def |(that: Set[A]): SortedSet[A]

    Computes the union between this set and another set