Class HashTable

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(capacity: number, hash: (k: TKey) => number): HashTable

Parameters

  • capacity: number
  • hash: (k: TKey) => number

Returns

HashTable

Properties

private count: any

private entries: any

private hash: any

Methods

public add(key: TKey in TypeScript.Collections.HashTable<TKey, TValue>, value: TValue in TypeScript.Collections.HashTable<TKey, TValue>)

Parameters

  • key: TKey in TypeScript.Collections.HashTable<TKey, TValue>
  • value: TValue in TypeScript.Collections.HashTable<TKey, TValue>

private addEntry(key: any, value: any, hashCode: any): any

Parameters

  • key: any
  • value: any
  • hashCode: any

Returns

any

private addOrSet(key: any, value: any, throwOnExistingEntry: any): any

Parameters

  • key: any
  • value: any
  • throwOnExistingEntry: any

Returns

any

private computeHashCode(key: any): any

Parameters

  • key: any

Returns

any

public containsKey(key: TKey in TypeScript.Collections.HashTable<TKey, TValue>): boolean

Parameters

  • key: TKey in TypeScript.Collections.HashTable<TKey, TValue>

Returns

boolean

private findEntry(key: any, hashCode: any): any

Parameters

  • key: any
  • hashCode: any

Returns

any

public get(key: TKey in TypeScript.Collections.HashTable<TKey, TValue>): TValue in TypeScript.Collections.HashTable<TKey, TValue>

Parameters

  • key: TKey in TypeScript.Collections.HashTable<TKey, TValue>

Returns

TValue in TypeScript.Collections.HashTable<TKey, TValue>

private grow(): any

Returns

any

public set(key: TKey in TypeScript.Collections.HashTable<TKey, TValue>, value: TValue in TypeScript.Collections.HashTable<TKey, TValue>)

Parameters

  • key: TKey in TypeScript.Collections.HashTable<TKey, TValue>
  • value: TValue in TypeScript.Collections.HashTable<TKey, TValue>