|
Scala 2.3.0
|
class
TreeMap
[A, B]
extends
scala.collection.immutable.Tree[A, scala.Tuple2[A, B]]
with
scala.collection.immutable.Map[A, B]
with
scala.ScalaObject
Constructor Summary | |
def
this
()(view$1: (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. |
Def inherited from scala.collection.immutable.Tree[A, scala.Tuple2[A, B]] | |
New , add, balance, delete, deleteAny, entries, findValue, getThis, size, tree, updateOrAdd |
Def inherited from scala.collection.immutable.Map[A, B] | |
+ , -, empty, excl, excl, filter, hashCode, incl, incl, map, mappingToString, toString, update |
Constructor Detail |
Def Detail |
def
-
(key: A): scala.collection.immutable.TreeMap[A, B]
protected
def
New
(sz: scala.Int, t: scala.collection.immutable.GBTree[A, scala.Tuple2[A, B]]): scala.collection.immutable.TreeMap[A, B]
sz -
...
t -
...
key -
the key
Error("key -
not found").
def
elements
: scala.Iterator[scala.Tuple2[A, B]]
def
empty
[C]: scala.collection.immutable.TreeMap[A, C]
override
def
equals
(obj: scala.Any): scala.Boolean
override
def
get
(key: A): scala.Option[B]
key
to a value and return the
value if it exists.key -
the key of the mapping of interest
override protected
def
getThis
: scala.collection.immutable.TreeMap[A, B]
def
insert
(key: A, value: B): scala.collection.immutable.TreeMap[A, B]
override
def
toList
: scala.List[scala.Tuple2[A, B]]
def
update
(key: A, value: B): scala.collection.immutable.TreeMap[A, B]
key -
...
value -
...