Class: Hashtable

data-structures/hash-table. Hashtable

Constructor

new Hashtable()

Construct a Hash table..
Source:

Methods

get(key)

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

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.
Parameters:
Name Type Description
val Number | String Key to be hashed.
Source:

put(key, data)

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

remove(key)

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