scala.collection.immutable
class TreeMap

[source: `scala/collection/immutable/TreeMap.scala`]

@serializable
`` `class` TreeMap[A, +B](`val` size : Int, t : Tree[B], `implicit` view$3 : (A) => Ordered[A])
  `extends` RedBlack[A]`with` SortedMap[A, B]

  This class implements immutable maps using a tree.

Author
  Erik Stenman
  Matthias Zenger
Version
  1.1, 03/05/2004

Additional Constructor Summary
`def` | this ()(`implicit` view$4 : (A) => Ordered[A]) : TreeMap[A, B]

Value Summary
`protected val` | tree : Tree[B]

Method Summary
`def` | - (key : A) : TreeMap[A, B] Remove a key from this map
`override def` | apply (key : A) : B Retrieve the value which is associated with the given key. This method throws an exception if there is no mapping from the given key to a value.
`override def` | compare (k0 : A, k1 : A) : Int Comparison function that orders keys.
`def` | elements : Iterator[(A, B)] Creates a new iterator over all elements contained in this object.
`def` | empty [C] : TreeMap[A, C] A factory to create empty maps of the same type of keys.
`override def` | exists (f : ((A, B)) => Boolean) : Boolean Apply a predicate `p` to all elements of this iterable object and return true, iff there is at least one element for which `p` yields true.
`override def` | firstKey : A Returns the first key of the collection.
`override def` | forall (f : ((A, B)) => Boolean) : Boolean Apply a predicate `p` to all elements of this iterable object and return true, iff the predicate yields true for all elements.
`override def` | foreach (f : ((A, B)) => Unit) : Unit Apply a function `f` to all elements of this iterable object.
`override def` | get (key : A) : Option[B] Check if this map maps `key` to a value and return the value if it exists.
`def` | insert [B1 >: B](key : A, value : B1) : TreeMap[A, B1] A new TreeMap with the entry added is returned, assuming that key is not in the TreeMap.
`def` | isSmaller (x : A, y : A) : Boolean
`override def` | lastKey : A Returns the last key of the collection.
`override def` | rangeImpl (from : Option[A], until : Option[A]) : SortedMap[A, B] 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` | update [B1 >: B](key : A, value : B1) : TreeMap[A, B1] A new TreeMap with the entry added is returned, if key is not in the TreeMap, otherwise the key is updated with the new entry.

Methods inherited from SortedMap
from, until, range, +, +, ++, ++, -, --, --, transform, filter

Methods inherited from SortedMap
keySet

Methods inherited from Sorted
to, hasAll

Methods inherited from Map
withDefault, withDefaultValue, +, incl, incl, excl, excl, mappingToString

Methods inherited from Map
getOrElse, isEmpty, contains, isDefinedAt, keys, values, equals, hashCode, toString, default, projection, filterKeys, mapElements

Methods inherited from Collection
toArray, stringPrefix

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

Methods inherited from PartialFunction
orElse, andThen

Methods inherited from Function1
compose

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

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