Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapImpl<K, V>

Type parameters

  • K

  • V

Hierarchy

  • MapImpl

Implements

Index

Constructors

constructor

  • new MapImpl(kvs: [K, V][]): MapImpl
  • Parameters

    • kvs: [K, V][]

    Returns MapImpl

Properties

Private _keys

_keys: K[]

Private _kvs

_kvs: [K, V][]

Private _values

_values: V[]

Methods

Private _idx

  • _idx(k: K): number
  • Parameters

    • k: K

    Returns number

delete

  • delete(k: K): Map<K, V>
  • Parameters

    • k: K

    Returns Map<K, V>

entries

  • entries(): Iterator<[K, V], undefined, undefined>
  • Returns Iterator<[K, V], undefined, undefined>

entriesArray

  • entriesArray(): [K, V][]
  • Returns [K, V][]

forEach

  • forEach<T, U>(f: (v: V, k: K, m: Map<K, V>) => T, u?: U): void
  • Type parameters

    • T

    • U

    Parameters

    • f: (v: V, k: K, m: Map<K, V>) => T
        • (v: V, k: K, m: Map<K, V>): T
        • Parameters

          • v: V
          • k: K
          • m: Map<K, V>

          Returns T

    • Optional u: U

    Returns void

get

  • get(k: K): V | undefined
  • Parameters

    • k: K

    Returns V | undefined

has

  • has(k: K): boolean
  • Parameters

    • k: K

    Returns boolean

keys

  • keys(): Iterator<K, undefined, undefined>
  • Returns Iterator<K, undefined, undefined>

set

  • set(k: K, v: V): Map<K, V>
  • Parameters

    • k: K
    • v: V

    Returns Map<K, V>

values

  • values(): Iterator<V, undefined, undefined>
  • Returns Iterator<V, undefined, undefined>

Generated using TypeDoc