1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
// $Id$
package scala.collection.mutable
/** <p>
* This is a simple wrapper class for <a href="Map.html"
* target="contentFrame"><code>scala.collection.mutable.Map</code></a>.
* </p>
* <p>
* It is most useful for assembling customized map abstractions
* dynamically using object composition and forwarding.
* </p>
*
* @author Matthias Zenger
* @author Martin Odersky
* @version 2.0, 31/12/2006
*/
trait MapProxy[A, B] extends Map[A, B] with collection.MapProxy[A, B] {
def self: Map[A, B]
override def update(key: A, value: B): Unit = self.update(key, value)
override def += (kv: Pair[A, B]) = self += kv
override def += (kv1: Pair[A, B], kv2: Pair[A, B], kvs: Pair[A, B]*) = self.+=(kv1, kv2, kvs: _*)
override def ++= (kvs: Iterable[Pair[A, B]]) = self ++= kvs
override def ++= (kvs: Iterator[Pair[A, B]]) = self ++= kvs
override def + (kv: Pair[A, B]): Map[A, B] = self + kv
override def + (kv1: Pair[A, B], kv2: Pair[A, B], kvs: Pair[A, B]*): Map[A, B] = self.+(kv1, kv2, kvs: _*)
override def ++ (kvs: Iterable[Pair[A, B]]): Map[A, B] = self ++ kvs
override def ++ (kvs: Iterator[Pair[A, B]]): Map[A, B] = self ++ kvs
override def -= (key: A) = self -= key
override def -= (key1: A, key2: A, keys: A*) = self.-=(key1, key2, keys: _*)
override def --= (keys: Iterable[A]) = self --= keys
override def --= (keys: Iterator[A]) = self --= keys
override def - (key: A): Map[A, B] = self - key
override def - (key1: A, key2: A, keys: A*): Map[A, B] = self.-(key1, key2, keys: _*)
override def -- (keys: Iterable[A]): Map[A, B] = self -- keys
override def -- (keys: Iterator[A]): Map[A, B] = self -- keys
override def clear: Unit = self.clear
override def transform(f: (A, B) => B) = self transform f
override def retain(p: (A, B) => Boolean): Unit = self retain p
override def <<(cmd: Message[Pair[A, B]]): Unit = self << cmd
override def clone(): Map[A, B] = self.clone()
[deprecated] override def incl(mappings: Pair[A, B]*): Unit = self.incl(mappings: _*)
[deprecated] override def excl(keys: A*): Unit = self.excl(keys: _*)
[deprecated] override def map[C](f: Pair[A, B] => C): Iterable[C] = self map f
[deprecated] override def filter(p: Pair[A, B] => Boolean): Iterable[Pair[A, B]] = self filter p
}
|