blob: c2d6239a801e30496163be4f71317687cbe0822e (
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
|
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
// $Id$
package scala.collection.jcl;
/** <p>
* A map that is backed by a Java weak hash map, whose keys are maintained
* as weak references.
* </p>
* <p>
* Because keys are weak references, the garbage collector can collect
* them if they are not referred to elsewhere.
* </p>
* <p>
* Useful for implementing caches.
* </p>
*
* @author Sean McDirmid
*/
class WeakHashMap[K,E](override val underlying: java.util.WeakHashMap) extends MapWrapper[K,E] {
def this() = this(new java.util.WeakHashMap);
}
|