Hashtable

data-structures/hash-table. Hashtable

new Hashtable()

Construct a Hash table..
Source:

Methods

get(key)

Get's data from the table based on key.
Source:
Parameters:
Name Type Description
key Number | String Key for data to be retrieved.

hashCode(val)

Simple non-crypto hash used to hash keys, which determines while bucket the value will be placed in. A javascript implementation of Java's 32bitint hash.
Source:
Parameters:
Name Type Description
val Number | String Key to be hashed.

put(key, data)

Puts data into the table based on hashed key value.
Source:
Parameters:
Name Type Description
key Number | String Key for data.
data Number | String Data to be stored in table.

remove(key)

Removes data from the table based on key.
Source:
Parameters:
Name Type Description
key Number | String Key of the data to be removed.