identityhashmap.scala
来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 25 行
SCALA
25 行
/* __ *\** ________ ___ / / ___ Scala API **** / __/ __// _ | / / / _ | (c) 2006-2008, LAMP/EPFL **** __\ \/ /__/ __ |/ /__/ __ | http://www.scala-lang.org/ **** /____/\___/_/ |_/____/_/ | | **** |/ **\* */// $Id: IdentityHashMap.scala 14016 2008-02-15 11:30:27Z michelou $package scala.collection.jcl/** A map that is backed by a Java identity hash map, which compares keys * by their reference-based identity as opposed to using equals and hashCode. * An identity hash map will often perform better than traditional hash map * because it can utilize linear probing. * * @author Sean McDirmid */class IdentityHashMap[K, E](override val underlying : java.util.IdentityHashMap[K, E]) extends MapWrapper[K, E] { def this() = this(new java.util.IdentityHashMap[K, E]) override def clone: IdentityHashMap[K, E] = new IdentityHashMap[K, E](underlying.clone().asInstanceOf[java.util.IdentityHashMap[K, E]])}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?