scala.collection.jcl
trait Sorted

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

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

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

Author
  Sean McDirmid

Direct Known Subclasses:
  SortedMap, SortedSet

Type Summary
`protected override abstract type` | SortedSelf <: Sorted[K, A]

Method Summary
`override 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]) : SortedSelf 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 final def` | to (to : K) : SortedSelf Create a range projection of this collection with no lower-bound. * @param to The upper-bound (inclusive) of the ranged projection.

Methods inherited from Ranged
first (abstract), last (abstract), compare (abstract), from, until, range

Methods inherited from MutableIterable
elements (abstract), has, remove, removeAll, --, -, retain, retainAll, size0, clear, projection

Methods inherited from Collection
size (abstract), toArray, toString, stringPrefix

Methods inherited from Sorted
hasAll

Methods inherited from Iterable
concat, ++, map, flatMap, filter, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, addString, addString, copyToArray, isEmpty, hasDefiniteSize

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

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

Type Details

`protected override abstract` `type` SortedSelf <: Sorted[K, A]

Method Details

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

  return as a projection the set of keys in this collection

Overrides
  Sorted.keySet

`override abstract` `def` rangeImpl(from : Option[K], until : Option[K]) : SortedSelf

  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, Ranged.rangeImpl

`override final` `def` to(to : K) : SortedSelf

  Create a range projection of this collection with no lower-bound. * @param to The upper-bound (inclusive) of the ranged projection.

Overrides
  Sorted.to