scala.collection

trait SortedSet

[source: scala/collection/SortedSet.scala]

trait SortedSet[A]
extends Set[A] with Sorted[A, A]
Analogous to a Java sorted set.
Author
Sean McDirmid
Direct Known Subclasses:
SortedMap.DefaultKeySet, SortedSet, SortedSet

Method Summary
override def firstKey : A
Returns the first key of the collection.
override def from (from : A) : SortedSet[A]
Creates a ranged projection of this collection with no upper-bound.
override def keySet : SortedSet[A]
return as a projection the set of keys in this collection
override def lastKey : A
Returns the last key of the collection.
override def range (from : A, until : A) : SortedSet[A]
Creates a ranged projection of this collection with both a lower-bound and an upper-bound.
override abstract def rangeImpl (from : Option[A], until : Option[A]) : SortedSet[A]
Creates a ranged projection of this collection. Any mutations in the ranged projection will update this collection and vice versa. Keys are garuanteed to be consistent between the collection and its projection.
override def subsetOf (that : Set[A]) : Boolean
Checks if this set is a subset of set that.
override def until (until : A) : SortedSet[A]
Creates a ranged projection of this collection with no lower-bound.
Methods inherited from Sorted
to, hasAll
Methods inherited from Set
size (abstract), contains (abstract), apply, isEmpty, *, **, equals, hashCode, toArray, stringPrefix
Methods inherited from Collection
toString
Methods inherited from Iterable
elements (abstract), concat, ++, map, flatMap, filter, partition, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toSeq, toStream, mkString, mkString, mkString, addString, addString, copyToArray, projection, hasDefiniteSize
Methods inherited from Function1
compose, andThen
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Methods inherited from Ranged
compare (abstract)
Method Details
override def keySet : SortedSet[A]
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.

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

override abstract def rangeImpl(from : Option[A], until : Option[A]) : SortedSet[A]
Creates a ranged projection of this collection. Any mutations in the ranged projection will update this collection and vice versa. Keys are garuanteed to be consistent between the collection and its 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) : SortedSet[A]
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) : SortedSet[A]
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) : SortedSet[A]
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
Set.subsetOf