blob: 742f0e85ea898a826c2311b4f0bc10f048a5105e (
plain) (
tree)
|
|
import scala.collection.mutable.WeakHashMap
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())
}
}
|