summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/jcl/IdentityHashMap.scala
blob: 6fdc7c827ff04d0ef88cafff62b172bd285a85b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*                     __                                               *\
**     ________ ___   / /  ___     Scala API                            **
**    / __/ __// _ | / /  / _ |    (c) 2006-2007, LAMP/EPFL             **
**  __\ \/ /__/ __ |/ /__/ __ |                                         **
** /____/\___/_/ |_/____/_/ | |                                         **
**                          |/                                          **
\*                                                                      */

// $Id$

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]);
}