scala.collection

trait SortedSetLike

[source: scala/collection/SortedSetLike.scala]

trait SortedSetLike[A, +This <: SortedSet[A] with SortedSetLike[A, This]]
extends Sorted[A, This] with SetLike[A, This]
A template for sets which are sorted.
Author
Sean McDirmid
Martin Odersky
Version
2.8
Since
2.8
Direct Known Subclasses:
SortedSet, SortedSet, TreeSet

Method Summary
override def firstKey : A
Returns the first key of the collection.
override def from (from : A) : This
Creates a ranged projection of this collection with no upper-bound.
override def keySet : This
return as a projection the set of keys in this collection
override def lastKey : A
Returns the last key of the collection.
implicit abstract def ordering : Ordering[A]
override def range (from : A, until : A) : This
Creates a ranged projection of this collection with both a lower-bound and an upper-bound.
abstract def rangeImpl (from : Option[A], until : Option[A]) : This
Creates a ranged projection of this collection. Any mutations in the ranged projection will update this collection and vice versa. Note: keys are not garuanteed to be consistent between this collection and the projection. This is the case for buffers where indexing is relative to the projection.
override def subsetOf (that : Set[A]) : Boolean
Checks if this set is a subset of set that.
override def until (until : A) : This
Creates a ranged projection of this collection with no lower-bound.
Methods inherited from SetLike
empty (abstract), contains (abstract), + (abstract), - (abstract), newBuilder, isEmpty, apply, intersect, &, **, union, |, diff, &~, stringPrefix, toString, hashCode, equals
Methods inherited from Subtractable
-, --, --
Methods inherited from Addable
+, ++, ++
Methods inherited from IterableLike
iterator (abstract), thisCollection, toCollection, elements, foreach, forall, exists, find, foldRight, reduceRight, toIterable, head, take, slice, takeWhile, takeRight, dropRight, copyToArray, zip, zipAll, zipWithIndex, sameElements, toStream, canEqual, view, view, first, firstOption, projection
Methods inherited from TraversableLike
repr, nonEmpty, size, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, drop, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toList, toSeq, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, withFilter
Methods inherited from Sorted
compare, to, hasAll
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
implicit abstract def ordering : Ordering[A]
Overrides
Sorted.ordering

override def keySet : This
return as a projection the set of keys in this collection
Overrides
Sorted.keySet

override def firstKey : A
Returns the first key of the collection.
Overrides
Sorted.firstKey

override def lastKey : A
Returns the last key of the collection.
Overrides
Sorted.lastKey

abstract def rangeImpl(from : Option[A], until : Option[A]) : This
Creates a ranged projection of this collection. Any mutations in the ranged projection will update this collection and vice versa. Note: keys are not garuanteed to be consistent between this collection and the projection. This is the case for buffers where indexing is relative to the projection.
Parameters
from - The lower-bound (inclusive) of the ranged projection. None if there is no lower bound.
until - The upper-bound (exclusive) of the ranged projection. None if there is no upper bound.
Overrides
Sorted.rangeImpl

override def from(from : A) : This
Creates a ranged projection of this collection with no upper-bound.
Parameters
from - The lower-bound (inclusive) of the ranged projection.
Overrides
Sorted.from

override def until(until : A) : This
Creates a ranged projection of this collection with no lower-bound.
Parameters
until - The upper-bound (exclusive) of the ranged projection.
Overrides
Sorted.until

override def range(from : A, until : A) : This
Creates a ranged projection of this collection with both a lower-bound and an upper-bound.
Parameters
from - The upper-bound (exclusive) of the ranged projection.
until - ...
Returns
...
Overrides
Sorted.range

override def subsetOf(that : Set[A]) : Boolean
Checks if this set is a subset of set that.
Parameters
that - another set.
Returns
true iff the other set is a superset of this set. todo: rename to isSubsetOf
Overrides
SetLike.subsetOf