in scala.collection.immutable
class TreeMap

[scala.serializable]
`class` TreeMap [A, B]
  `extends` scala.collection.immutable.Tree[A, scala.Tuple2[A, B]]
  `with` scala.collection.immutable.Map[A, B]
  `with` scala.ScalaObject

  This class implements immutable maps using a tree.

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

Constructor Summary
| `def` this ()(view$1: scala.Function1[A, scala.Ordered[A]])

Type Summary
`override` `protected` | `type` This

Def Summary
| `def` - (key: A) : scala.collection.immutable.TreeMap[A, B] Removes the key from the TreeMap.
`protected` | `def` New (sz: scala.Int, t: scala.collection.immutable.GBTree[A, scala.Tuple2[A, B]]) : scala.collection.immutable.TreeMap[A, B] Creates a new TreeMap from a GBTree and its size.
`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.
| `def` elements : scala.Iterator[scala.Tuple2[A, B]] Creates a new iterator over all elements contained in this object.
| `def` empty [C] : scala.collection.immutable.TreeMap[A, C] A factory to create empty maps of the same type of keys.
`override` | `def` equals (obj: scala.Any) : scala.Boolean Compares two maps structurally; i.e. checks if all mappings contained in this map are also contained in the other map, and vice versa.
`override` | `def` get (key: A) : scala.Option[B] Check if this map maps `key` to a value and return the value if it exists.
`override` `protected` | `def` getThis : scala.collection.immutable.TreeMap[A, B]
| `def` insert (key: A, value: B) : scala.collection.immutable.TreeMap[A, B] A new TreeMap with the entry added is returned, assuming that key is not in the TreeMap.
`override` | `def` toList : scala.List[scala.Tuple2[A, B]] Creates a list of all (key, value) mappings.
| `def` update (key: A, value: B) : scala.collection.immutable.TreeMap[A, B] 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.

Constructor Detail

`def` this ()(view$1: scala.Function1[A, scala.Ordered[A]])

Type Detail

`override protected type` This

Def Detail

`def` - (key: A): scala.collection.immutable.TreeMap[A, B]

  Removes the key from the TreeMap.

`protected def` New (sz: scala.Int, t: scala.collection.immutable.GBTree[A, scala.Tuple2[A, B]]): scala.collection.immutable.TreeMap[A, B]

  Creates a new TreeMap from a GBTree and its size.

Parameters:
  `sz -` ...
Parameters:
  `t -` ...
Returns:
  ...

`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.

Parameters:
  `key -` the key
Returns:
  the value associated with the given key.
Throws:
  `Error -` ("key not found").

`def` elements : scala.Iterator[scala.Tuple2[A, B]]

  Creates a new iterator over all elements contained in this object.

Returns:
  the new iterator

`def` empty [C]: scala.collection.immutable.TreeMap[A, C]

  A factory to create empty maps of the same type of keys.

`override def` equals (obj: scala.Any): scala.Boolean

  Compares two maps structurally; i.e. checks if all mappings contained in this map are also contained in the other map, and vice versa.

Returns:
  true, iff both maps contain exactly the same mappings.

`override def` get (key: A): scala.Option[B]

  Check if this map maps `key` to a value and return the value if it exists.

Parameters:
  `key -` the key of the mapping of interest
Returns:
  the value of the mapping, if it exists

`override protected def` getThis : scala.collection.immutable.TreeMap[A, B]

`def` insert (key: A, value: B): scala.collection.immutable.TreeMap[A, B]

  A new TreeMap with the entry added is returned, assuming that key is not in the TreeMap.

`override def` toList : scala.List[scala.Tuple2[A, B]]

  Creates a list of all (key, value) mappings.

Returns:
  the list of all mappings

`def` update (key: A, value: B): scala.collection.immutable.TreeMap[A, B]

  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.

Parameters:
  `key -` ...
Parameters:
  `value -` ...
Returns:
  ...