|
Scala Library
|
|
class
UnbalancedTreeMap[A, +B](implicit view$3 : (A) => Ordered[A])
extends Map[A, B]| Method Summary | |
def
|
-
(key : A) : UnbalancedTreeMap[A, B]
Remove a key from this map
|
protected def
|
add [B1 >: B](key : A, value : B1) : Node[B1] |
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
: Iterator[(A, B)]
Creates a new iterator over all elements contained in this
object.
|
def
|
empty
[C] : UnbalancedTreeMap[A, C]
A factory to create empty maps of the same type of keys.
|
protected def
|
findValue (key : A) : UnbalancedTreeMap[A, B] |
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) : Node[B1]
A new TreeMap with the entry added is returned,
assuming that key is not in the TreeMap.
|
override def
|
isEmpty
: Boolean
Is this an empty map?
|
protected def
|
key : A |
def
|
size
: Int
Compute the number of key-to-value mappings.
|
protected def
|
smallest : UnbalancedTreeMap[A, B] |
def
|
update
[B1 >: B](key : A, value : B1) : Node[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.
|
protected def
|
value : B |
| Methods inherited from Map | |
| +, +, ++, ++, -, --, --, withDefault, withDefaultValue, transform, filter, +, incl, incl, excl, excl, mappingToString |
| Methods inherited from Map | |
| getOrElse, contains, isDefinedAt, keys, keySet, values, equals, hashCode, toString, default, projection, filterKeys, mapElements, stringPrefix |
| Methods inherited from Collection | |
| toArray |
| Methods inherited from Iterable | |
| concat, ++, map, flatMap, partition, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toSeq, toStream, mkString, mkString, mkString, addString, 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 |
| Class Summary | |
protected class
|
Node
[+B](protected val override key : A, protected val override value : B, left : UnbalancedTreeMap[A, B], right : UnbalancedTreeMap[A, B]) extends UnbalancedTreeMap[A, B]
|
| Method Details |
def
empty[C] : UnbalancedTreeMap[A, C]
def
size : Int
override
def
isEmpty : Boolean
true iff the map is empty.protected
def
findValue(key : A) : UnbalancedTreeMap[A, B]
protected
def
key : A
protected
def
value : B
protected
def
smallest : UnbalancedTreeMap[A, B]
key - ...value - ...
def
-(key : A) : UnbalancedTreeMap[A, B]
key - the key to be removedkey it is returned unchanged. Otherwise, return a new map
without a binding for keykey to a value and return the
value if it exists.key - the key of the mapping of interestkey - the keyError("key - not found").|
Scala Library
|
|