scala.collection
trait Sorted

[source: `scala/collection/Sorted.scala`]

`` `trait` Sorted[K, +A]
  `extends` Ranged[K, A]

  Any collection (including maps) whose keys (or elements) are ordered.

Author
  Sean McDirmid

Direct Known Subclasses:
  SortedMap, SortedSet, Sorted

Method Summary
`override def` | from (from : K) : Sorted[K, A] Creates a ranged projection of this collection with no upper-bound.
`protected def` | hasAll (j : Iterator[K]) : Boolean
`abstract def` | keySet : SortedSet[K] return as a projection the set of keys in this collection
`override def` | range (from : K, until : K) : Sorted[K, A] Creates a ranged projection of this collection with both a lower-bound and an upper-bound.
`override abstract def` | rangeImpl (from : Option[K], until : Option[K]) : Sorted[K, 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.
`def` | to (to : K) : Sorted[K, A] Create a range projection of this collection with no lower-bound.
`override def` | until (until : K) : Sorted[K, A] Creates a ranged projection of this collection with no lower-bound.

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, toStream, mkString, mkString, mkString, addString, addString, copyToArray, isEmpty, projection, hasDefiniteSize

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Methods inherited from Ranged
firstKey (abstract), lastKey (abstract), compare (abstract)

Method Details

`abstract` `def` keySet : SortedSet[K]

  return as a projection the set of keys in this collection

`override abstract` `def` rangeImpl(from : Option[K], until : Option[K]) : Sorted[K, 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
  Ranged.rangeImpl

`override` `def` from(from : K) : Sorted[K, A]

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

Parameters
  `from -` The lower-bound (inclusive) of the ranged projection.

Overrides
  Ranged.from

`override` `def` until(until : K) : Sorted[K, A]

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

Parameters
  `until -` The upper-bound (exclusive) of the ranged projection.

Overrides
  Ranged.until

`override` `def` range(from : K, until : K) : Sorted[K, 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
  Ranged.range

`` `def` to(to : K) : Sorted[K, A]

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

Parameters
  `to -` The upper-bound (inclusive) of the ranged projection.

`protected` `def` hasAll(j : Iterator[K]) : Boolean