scala.collection.mutable
trait MapProxy

[source: `scala/collection/mutable/MapProxy.scala`]

`` `trait` MapProxy[A, B]
  `extends` Map[A, B]`with` MapProxy[A, B]

  This is a simple wrapper class for `scala.collection.mutable.Map`.

  It is most useful for assembling customized map abstractions dynamically using object composition and forwarding.

Author
  Matthias Zenger, Martin Odersky
Version
  2.0, 31/12/2006

Method Summary
`override def` | + (kv : (A, B)) : Map[A, B] Add a key/value pair to this map.
`override def` | + (kv1 : (A, B), kv2 : (A, B), kvs : (A, B)*) : Map[A, B] Add two or more key/value pairs to this map.
`override def` | ++ (kvs : Iterable[(A, B)]) : Map[A, B] Add a sequence of key/value pairs to this map.
`override def` | ++ (kvs : Iterator[(A, B)]) : Map[A, B] Add a sequence of key/value pairs to this map.
`override def` | ++= (kvs : Iterable[(A, B)]) : Unit Add a sequence of key/value pairs to this map.
`override def` | ++= (kvs : Iterator[(A, B)]) : Unit Add a sequence of key/value pairs to this map.
`override def` | += (kv : (A, B)) : Unit Add a key/value pair to this map.
`override def` | += (kv1 : (A, B), kv2 : (A, B), kvs : (A, B)*) : Unit Add two or more key/value pairs to this map.
`override def` | - (key1 : A, key2 : A, keys : A*) : Map[A, B] Remove two or more keys from this map
`override def` | - (key : A) : Map[A, B] Remove a key from this map
`override def` | -- (keys : Iterable[A]) : Map[A, B] Remove a sequence of keys from this map
`override def` | -- (keys : Iterator[A]) : Map[A, B] Remove a sequence of keys from this map
`override def` | --= (keys : Iterable[A]) : Unit Remove a sequence of keys from this map
`override def` | --= (keys : Iterator[A]) : Unit Remove a sequence of keys from this map
`override def` | -= (key1 : A, key2 : A, keys : A*) : Unit Remove two or more keys from this map
`override def` | -= (key : A) : Unit Remove a key from this map, noop if key is not present.
`override def` | << (cmd : Message[(A, B)]) : Unit Send a message to this scriptable object.
`override def` | clear : Unit Removes all mappings from the map. After this operation is completed, the map is empty.
`override def` | clone : Map[A, B] Return a clone of this map.
`override def` | excl (keys : A*) : Unit This method will remove all the mappings for the given sequence of keys from the map.
`override def` | incl (mappings : (A, B)*) : Unit `incl` can be used to add many mappings at the same time to the map. The method assumes that a mapping is represented by a `Pair` object who's first component denotes the key, and who's second component refers to the value.
`override def` | retain (p : (A, B) => Boolean) : Unit This method retains only those mappings for which the predicate `p` returns `true`.
`abstract def` | self : Map[A, B]
`override def` | transform (f : (A, B) => B) : Unit This function transforms all the values of mappings contained in this map with function `f`.
`override def` | update (key : A, value : B) : Unit This method allows one to add a new mapping from `key` to `value` to the map. If the map already contains a mapping for `key`, it will be overridden by this function.

Methods inherited from MapProxy
size, get, isEmpty, apply, contains, isDefinedAt, keys, keySet, values, default

Methods inherited from IterableProxy
elements, concat, map, flatMap, filter, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, sameElements, copyToBuffer, toList, mkString, addString

Methods inherited from Proxy
hashCode, equals, toString

Methods inherited from Map
getOrElseUpdate, +=

Methods inherited from Map
getOrElse, projection, filterKeys, mapElements

Methods inherited from Collection
toArray, stringPrefix, equalWith

Methods inherited from Iterable
++, mkString, 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

Method Details

`abstract` `def` self : Map[A, B]

Overrides
  MapProxy.self

`override` `def` update(key : A, value : B) : Unit

  This method allows one to add a new mapping from `key` to `value` to the map. If the map already contains a mapping for `key`, it will be overridden by this function.

Parameters
  `key -` The key to update
  `value -` The new value

Overrides
  Map.update

`override` `def` +=(kv : (A, B)) : Unit

  Add a key/value pair to this map.

Parameters
  `kv -` the key/value pair.

Overrides
  Map.+=

`override` `def` +=(kv1 : (A, B), kv2 : (A, B), kvs : (A, B)*) : Unit

  Add two or more key/value pairs to this map.

Parameters
  `kv1 -` the first key/value pair.
  `kv2 -` the second key/value pair.
  `kvs -` the remaining key/value pairs.

Overrides
  Map.+=

`override` `def` ++=(kvs : Iterable[(A, B)]) : Unit

  Add a sequence of key/value pairs to this map.

Parameters
  `kvs -` the iterable object containing all key/value pairs.

Overrides
  Map.++=

`override` `def` ++=(kvs : Iterator[(A, B)]) : Unit

  Add a sequence of key/value pairs to this map.

Parameters
  `kvs -` the iterator containing all key/value pairs.

Overrides
  Map.++=

`override` `def` +(kv : (A, B)) : Map[A, B]

  Add a key/value pair to this map.

Parameters
  `kv -` the key/value pair.
Returns
  The map itself with the new binding added in place.

Overrides
  Map.+

`override` `def` +(kv1 : (A, B), kv2 : (A, B), kvs : (A, B)*) : Map[A, B]

  Add two or more key/value pairs to this map.

Parameters
  `kv1 -` the first key/value pair.
  `kv2 -` the second key/value pair.
  `kvs -` the remaining key/value pairs.
Returns
  The map itself with the new bindings added in place.

Overrides
  Map.+

`override` `def` ++(kvs : Iterable[(A, B)]) : Map[A, B]

  Add a sequence of key/value pairs to this map.

Parameters
  `kvs -` the iterable object containing all key/value pairs.
Returns
  The itself map with the new bindings added in place.

Overrides
  Map.++

`override` `def` ++(kvs : Iterator[(A, B)]) : Map[A, B]

  Add a sequence of key/value pairs to this map.

Parameters
  `kvs -` the iterator containing all key/value pairs.
Returns
  The itself map with the new bindings added in place.

Overrides
  Map.++

`override` `def` -=(key : A) : Unit

  Remove a key from this map, noop if key is not present.

Parameters
  `key -` the key to be removed

Overrides
  Map.-=

`override` `def` -=(key1 : A, key2 : A, keys : A*) : Unit

  Remove two or more keys from this map

Parameters
  `key1 -` the first key to be removed
  `key2 -` the second key to be removed
  `keys -` the remaining keys to be removed

Overrides
  Map.-=

`override` `def` --=(keys : Iterable[A]) : Unit

  Remove a sequence of keys from this map

Parameters
  `keys -` the keys to be removed

Overrides
  Map.--=

`override` `def` --=(keys : Iterator[A]) : Unit

  Remove a sequence of keys from this map

Parameters
  `keys -` the keys to be removed

Overrides
  Map.--=

`override` `def` -(key : A) : Map[A, B]

  Remove a key from this map

Parameters
  `key -` the key to be removed
Returns
  The map itself with the binding for `key` removed if it existed.

Overrides
  Map.-

`override` `def` -(key1 : A, key2 : A, keys : A*) : Map[A, B]

  Remove two or more keys from this map

Parameters
  `key1 -` the first key to be removed
  `key2 -` the second key to be removed
  `keys -` the remaining keys to be removed
Returns
  The map itself with all bindings for the given keys removed.

Overrides
  Map.-

`override` `def` --(keys : Iterable[A]) : Map[A, B]

  Remove a sequence of keys from this map

Parameters
  `keys -` the keys to be removed
Returns
  The map itself with all bindings for `keys` removed.

Overrides
  Map.--

`override` `def` --(keys : Iterator[A]) : Map[A, B]

  Remove a sequence of keys from this map

Parameters
  `keys -` the keys to be removed
Returns
  The map itself with all bindings for `keys` removed.

Overrides
  Map.--

`override` `def` clear : Unit

  Removes all mappings from the map. After this operation is completed, the map is empty.

Overrides
  Map.clear

`override` `def` transform(f : (A, B) => B) : Unit

  This function transforms all the values of mappings contained in this map with function `f`.

Parameters
  `f -` The transformation to apply

Overrides
  Map.transform

`override` `def` retain(p : (A, B) => Boolean) : Unit

  This method retains only those mappings for which the predicate `p` returns `true`.

Parameters
  `p -` The test predicate

Overrides
  Map.retain

`override` `def` <<(cmd : Message[(A, B)]) : Unit

  Send a message to this scriptable object.

Parameters
  `cmd -` the message to send.

Overrides
  Map.<<

`override` `def` clone : Map[A, B]

  Return a clone of this map.

Returns
  a map with the same elements.

Overrides
  Map.clone

@deprecated
`override` `def` incl(mappings : (A, B)*) : Unit

  `incl` can be used to add many mappings at the same time to the map. The method assumes that a mapping is represented by a `Pair` object who's first component denotes the key, and who's second component refers to the value.

Parameters
  `mappings -`
Deprecated
  use `+=`

Overrides
  Map.incl

@deprecated
`override` `def` excl(keys : A*) : Unit

  This method will remove all the mappings for the given sequence of keys from the map.

Parameters
  `keys -`
Deprecated
  use `-=`

Overrides
  Map.excl