blob: 2161da45849c29ec1846a68e9f5e00e6ee3620dd (
plain) (
tree)
|
|
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())
}
}
|