scala.collection.mutable

trait MapProxy

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

trait MapProxy[A, B]
extends Map[A, B] with MapProxyLike[A, B, Map[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
Since
1
Method Summary
override def + (kv : (A, B)) : MapProxy[A, B]
Add a new key/value mapping and return the map itself.
override def + [B1 >: B](elem1 : (A, B1), elem2 : (A, B1), elems : (A, B1)*) : MapProxy[A, B]
Adds two or more elements to this collection and returns a new collection.
override def += (kv : (A, B)) : MapProxy[A, B]
Add a new key/value mapping this map.
override def - (key : A) : MapProxy[A, B]
Delete a key from this map if it is present and return the map itself.
override def -= (key : A) : MapProxy[A, B]
Delete a key from this map if it is present.
override def empty : MapProxy[A, B]
override def repr : MapProxy[A, B]
Methods inherited from MapProxyLike
get, iterator, isEmpty, getOrElse, apply, contains, isDefinedAt, keySet, keysIterator, keys, valuesIterable, valuesIterator, values, default, filterKeys, mapValues, addString
Methods inherited from IterableProxyLike
foreach, foldRight, reduceRight, toIterable, zip, zipAll, zipWithIndex, head, takeRight, dropRight, sameElements, toStream, view, view
Methods inherited from TraversableProxyLike
self (abstract), nonEmpty, size, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, remove, partition, groupBy, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, tail, last, lastOption, init, take, drop, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSeq, toSet, mkString, mkString, mkString, addString, addString, stringPrefix
Methods inherited from Proxy
hashCode, equals, toString
Methods inherited from MapLike
newBuilder, put, update, updated, cached, +, ++, ++, remove, removeKey, clear, getOrElseUpdate, transform, retain, clone, result, -, --, --
Methods inherited from Shrinkable
-=, --=, --=
Methods inherited from Builder
sizeHint, mapResult
Methods inherited from Growable
+=, ++=, ++=
Methods inherited from MapLikeBase
+
Methods inherited from MapLike
mapElements, ++, ++
Methods inherited from PartialFunction
orElse, andThen
Methods inherited from Function1
compose
Methods inherited from Iterable
companion
Methods inherited from IterableLike
thisCollection, toCollection, elements, canEqual, first, firstOption, projection
Methods inherited from GenericTraversableTemplate
genericBuilder, unzip, flatten, transpose
Methods inherited from TraversableLike
partialMap, sum, product, min, max, toIndexedSeq, withFilter
Methods inherited from AnyRef
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
override def repr : MapProxy[A, B]

override def empty : MapProxy[A, B]
Overrides
Map.empty

override def +(kv : (A, B)) : MapProxy[A, B]
Add a new key/value mapping and return the map itself.
Parameters
kv - the key/value mapping to be added

override def +[B1 >: B](elem1 : (A, B1), elem2 : (A, B1), elems : (A, B1)*) : MapProxy[A, B]
Adds two or more elements to this collection and returns a new collection.
Parameters
elem1 - the first element to add.
elem2 - the second element to add.
elems - the remaining elements to add.

override def -(key : A) : MapProxy[A, B]
Delete a key from this map if it is present and return the map itself.
Parameters
key - the key to be removed

override def +=(kv : (A, B)) : MapProxy[A, B]
Add a new key/value mapping this map.
Parameters
kv - the key/value pair.
Returns
the map itself

override def -=(key : A) : MapProxy[A, B]
Delete a key from this map if it is present.
Parameters
key - the key to be removed
Notes
same as `delete`.