scala.collection.immutable

trait MapProxy

[source: scala/collection/immutable/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
2.8
Method Summary
override def + [B1 >: B](elem1 : (A, B1), elem2 : (A, B1), elems : (A, B1)*) : MapProxy[A, B1]
Adds two or more elements to this collection and returns a new collection.
override def + [B1 >: B](kv : (A, B1)) : Map[A, B1]
Add a key/value pair to this map, returning a new map.
override def - (key : A) : MapProxy[A, B]
Removes a key from this map, returning a new map
override def empty : MapProxy[A, B]
override def repr : MapProxy[A, B]
override def updated [B1 >: B](key : A, value : B1) : MapProxy[A, B1]
Add a key/value pair to this map.
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 Map
withDefault, withDefaultValue
Methods inherited from MapLike
++, ++, transform, update
Methods inherited from MapLike
newBuilder, mapElements
Methods inherited from Subtractable
-, --, --
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, clone, 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 updated[B1 >: B](key : A, value : B1) : MapProxy[A, B1]
Add a key/value pair to this map.
Parameters
key - the key
value - the value
Returns
A new map with the new binding added to this map
Overrides
Map.updated

override def +[B1 >: B](kv : (A, B1)) : Map[A, B1]
Add a key/value pair to this map, returning a new map.
Parameters
kv - the key/value pair
Returns
A new map with the new binding added to this map
Overrides
Map.+

override def +[B1 >: B](elem1 : (A, B1), elem2 : (A, B1), elems : (A, B1)*) : MapProxy[A, B1]
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]
Removes a key from this map, returning a new map
Parameters
key - the key to be removed
Returns
A new map without a binding for key