scala.collection.jcl
trait SortedMap

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

`` `trait` SortedMap[K, E]
  `extends` SortedMap[K, E]`with` Map[K, E]`with` Sorted[K, (K, E)]

  A map whose keys are sorted.

Author
  Sean McDirmid

Direct Known Subclasses:
  SortedMap.Projection, SortedMapWrapper

Type Summary
`protected final type` | SortedSelf

Method Summary
`protected def` | Range (from : Option[K], until : Option[K]) : Projection[K, E]
`override abstract def` | compare (k0 : K, k1 : K) : Int Comparison function that orders keys.
`override def` | filterKeys (p : (K) => Boolean) : Projection[K, E] non-strict filter based on keys only
`override def` | firstKey : K Returns the first key of the collection.
`override def` | keySet : Projection[K] return as a projection the set of keys in this collection
`override def` | lastKey : K Returns the last key of the collection.
`override def` | lense [F](f : (E) => F, g : (F) => E) : Projection[K, F]
`override def` | projection : Projection[K, E] returns a projection that can be used to call non-strict `filter`, `map`, and `flatMap` methods that build projections of the collection.
`override def` | rangeImpl (from : Option[K], until : Option[K]) : SortedMap[K, E] 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.

Methods inherited from Sorted
to

Methods inherited from Ranged
from, until, range

Methods inherited from Map
put (abstract), elements (abstract), clear, isEmpty, keys, valueSet, putAll, removeKey, has, get, update, +, +=, -, remove, -=

Methods inherited from Map
+=, ++=, ++=, +, ++, ++, -=, --=, --=, -, --, --, getOrElseUpdate, transform, retain, <<, clone, +=, incl, excl

Methods inherited from MutableIterable
removeAll, --, -, retain, retainAll, size0

Methods inherited from Sorted
hasAll

Methods inherited from Map
size (abstract), getOrElse, apply, contains, isDefinedAt, values, equals, hashCode, toString, default, mapElements

Methods inherited from Collection
toArray, stringPrefix, equalWith

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, hasDefiniteSize

Methods inherited from PartialFunction
orElse, andThen

Methods inherited from Function1
compose

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

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

Class Summary
`protected class` | Filter (p : (K) => Boolean)`extends` Filter `with` Projection[K, E]
`protected class` | KeySet `extends` KeySet `with` Projection[K]
`protected class` | Lense [F](f : (E) => F, g : (F) => E)`extends` Lense[F]`with` Projection[K, F]
`protected class` | Range (from : Option[K], until : Option[K])`extends` Filter `with` Projection[K, E]

Type Details

`protected final` `type` SortedSelf

Method Details

`override abstract` `def` compare(k0 : K, k1 : K) : Int

  Comparison function that orders keys.

`override` `def` firstKey : K

  Returns the first key of the collection.

Overrides
  SortedMap.firstKey

`override` `def` lastKey : K

  Returns the last key of the collection.

Overrides
  SortedMap.lastKey

`override` `def` rangeImpl(from : Option[K], until : Option[K]) : SortedMap[K, E]

  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
  SortedMap.rangeImpl, Sorted.rangeImpl

`override` `def` keySet : Projection[K]

  return as a projection the set of keys in this collection

Overrides
  SortedMap.keySet, Map.keySet, Sorted.keySet

`override` `def` projection : Projection[K, E]

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

Overrides
  Map.projection

`override` `def` lense[F](f : (E) => F, g : (F) => E) : Projection[K, F]

Overrides
  Map.lense

`override` `def` filterKeys(p : (K) => Boolean) : Projection[K, E]

  non-strict filter based on keys only

Overrides
  Map.filterKeys

`protected` `def` Range(from : Option[K], until : Option[K]) : Projection[K, E]