weakhashmap.scala
来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 32 行
SCALA
32 行
/* __ *\** ________ ___ / / ___ Scala API **** / __/ __// _ | / / / _ | (c) 2006-2008, LAMP/EPFL **** __\ \/ /__/ __ |/ /__/ __ | http://www.scala-lang.org/ **** /____/\___/_/ |_/____/_/ | | **** |/ **\* */// $Id: WeakHashMap.scala 14016 2008-02-15 11:30:27Z michelou $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[K, E]) extends MapWrapper[K, E] { def this() = this(new java.util.WeakHashMap[K, E]) override def clone: WeakHashMap[K, E] = throw new CloneNotSupportedException("The underlying map doesn't implement the Cloneable interface")}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?