dundas.HashTable Class

A simple open hash table. Buckets store a collection of entries for handling hash collisions which are searched sequentially. As entries are added to the hash table, it will automatically resize to accommodate more entries. Both keys and values are permitted to be null in the hash table.
 

Inheritance Hierarchy

 
Class
   dundas.HashTable
      dundas.LinkedHashTable
 

Constructors

 
  Name Description
init Initializes a new instance of the hash table.
 
 

Properties

 
  Name Description
count Gets the number of entries stored in the hash table.
loadFactor Gets or sets the maximum ratio of entries vs capacity before the hashtable resizes to avoid excess collisions.
 
 

Methods

 
  Name Description
clear Removes all elements from the hash table.
containsKey Determines if key is stored in the hash table.
entries Returns the key/value pairs contained in the hash table.
fromJObject Applies the property values from a plain object created from JSON to the properties of this instance. Inherited from Class.
get Gets the value that was stored in the hash table with key.
keys Returns the keys contained in the hash table.
put Stores a key/value pair in the hash table.
putMany Stores a collection of key/value pairs in the hash table.
remove Removes a key/value pair from the hash table.
removeMany Removes a collection of key/value pairs from the hash table.
toJSON Implementation for toJSON to return an object that will include this class's prototype property values when stringified. Inherited from Class.
values Returns the values contained in the hash table.