HashMap

class HashMap[Key, Value](initialCapacity: Int, capacityMultiple: Int) extends GenericHashMap[Key, Value]

A specialized implementation of GenericHashMap with standard hashCode and equals as comparison

class GenericHashMap[Key, Value]
class MutableMap[Key, Value]
class ReadOnlyMap[Key, Value]
class Object
trait Matchable
class Any

Value members

Concrete methods

override def copyFrom(oldTable: Array[AnyRef | Null]): Unit
Definition Classes
final def hash(key: Key): Int

Hashcode is left-shifted by 1, so lowest bit is not lost when taking the index.

Hashcode is left-shifted by 1, so lowest bit is not lost when taking the index.

final def isEqual(x: Key, y: Key): Boolean

Equality, to be implemented in subclass

Equality, to be implemented in subclass

override def lookup(key: Key): Value | Null
Definition Classes
override def update(key: Key, value: Value): Unit
Definition Classes

Inherited methods

def -=(k: Key): HashMap[Key, Value]
Inherited from:
MutableMap
def apply(key: Key): Value
Inherited from:
ReadOnlyMap
def clear(): Unit

Remove all elements from this table and set back to initial configuration

Remove all elements from this table and set back to initial configuration

Inherited from:
GenericHashMap
def contains(key: Key): Boolean
Inherited from:
ReadOnlyMap
def get(key: Key): Option[Value]
Inherited from:
ReadOnlyMap
def getOrElse(key: Key, value: => Value): Value
Inherited from:
ReadOnlyMap
def getOrElseUpdate(key: Key, value: => Value): Value
Inherited from:
GenericHashMap
Inherited from:
ReadOnlyMap
def iterator: Iterator[(Key, Value)]
Inherited from:
GenericHashMap
Inherited from:
GenericHashMap
def remove(key: Key): Value | Null
Inherited from:
GenericHashMap
def size: Int

The number of elements in the set

The number of elements in the set

Inherited from:
GenericHashMap
def toArray: Array[(Key, Value)]
Inherited from:
ReadOnlyMap
def toSeq: Seq[(Key, Value)]
Inherited from:
ReadOnlyMap
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
Inherited from:
GenericHashMap
Inherited from:
GenericHashMap