blob: dcdde2e40cae28c8d8349970914c827c5247bc93 (
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
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
** $Id$
\* */
package scala.collection.mutable;
/** This class implements mutable maps using a hashtable.
*
* @author Matthias Zenger
* @version 1.0, 08/07/2003
*/
[serializable]
class HashMap[A, B] extends scala.collection.mutable.Map[A, B]
with HashTable[A]
with DefaultMapModel[A, B] {
def -=(key: A): Unit = removeEntry(key);
protected def entryKey(e: Entry) = e.key;
override def clear = {
initTable(table);
tableSize = 0;
}
override def clone(): Map[A, B] = {
val res = new HashMap[A, B];
res ++= this;
res
}
}
|