blob: 8284a628d2b3fa74e4ff3eea3739704530f7a19f (
plain) (
blame)
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
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
** $Id$
\* */
package scala.collection;
/** This is a simple wrapper class for <code>scala.collection.Map</code>.
* It is most useful for assembling customized map abstractions
* dynamically using object composition and forwarding.
*
* @author Matthias Zenger
* @version 1.0, 21/07/2003
*/
trait MapProxy[A, +B] extends Map[A, B] with IterableProxy[Pair[A, B]] {
def self: Map[A, B];
def size: Int = self.size;
def get(key: A): Option[B] = self.get(key);
override def isEmpty: Boolean = self.isEmpty;
override def apply(key: A): B = self.apply(key);
override def contains(key: A): Boolean = self.contains(key);
override def isDefinedAt(key: A) = self.isDefinedAt(key);
override def keys: Iterator[A] = self.keys;
override def values: Iterator[B] = self.values;
override def foreach(f: (A, B) => Unit) = self.foreach(f);
override def toList: List[Pair[A, B]] = self.toList;
}
|