blob: 2161da45849c29ec1846a68e9f5e00e6ee3620dd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import scala.collection.mutable.WeakHashMap
import scala.collection.JavaConversions._
class bar { }
class foo {
val map = WeakHashMap[AnyRef, collection.mutable.Map[bar, collection.mutable.Set[bar]]]()
def test={
val tmp:bar=null
if (map.get(tmp).isEmpty) map.put(tmp,collection.mutable.Set())
}
}
|