Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HashMap<K, V>

Type parameters

  • K

  • V

Hierarchy

Implements

Index

Constructors

constructor

  • Parameters

    • Default value iHash: Hashable<K> = AllFieldHashable.instance
    • Default value initialElements: ImmutableMap<K, V> = null
    • Default value iInitialCapacity: number = 20
    • Default value iLoadFactor: number = 0.75

    Returns HashMap

Methods

__@iterator

  • __@iterator(): Iterator<K>

Protected addEntry

  • addEntry(hash: number, key: K, value: V, bucket: number): void
  • Parameters

    • hash: number
    • key: K
    • value: V
    • Optional bucket: number

    Returns void

clear

  • clear(): void

containsKey

  • containsKey(key: K): boolean
  • Parameters

    • key: K

    Returns boolean

    true if this map contains a mapping for the specified key.

containsValue

  • containsValue(value: V): boolean

deprecatedGetFirstEntryForIterator

deprecatedGetNextEntryForIterator

entrySet

get

  • get(key: K): V
  • Parameters

    • key: K

    Returns V

    the value to which the specified key is mapped, or undefined if this map contains no mapping for the key

getEntry

immutableMap

isEmpty

  • isEmpty(): boolean

keySet

put

  • put(key: K, value: V): V
  • Parameters

    • key: K
    • value: V

    Returns V

    the previous value associated with key, or undefined if there was no mapping for key. (An undefined return can also indicate that the map previously associated undefined with key.)

remove

  • remove(key: K): V
  • Parameters

    • key: K

    Returns V

    the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key.)

size

  • size(): number
  • Returns number

    the number of key-value mappings in this map

toJSON

Generated using TypeDoc