Class Index | File Index

Classes


Class HashMap


Defined in: hashmap.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
HashMap(compareFunc, hashFunc, initialCapacity, loadFactor)
Hash Map
Method Summary
Method Attributes Method Name and Description
<inner>  
addEntry(hash, key, value, bucketIndex)
<inner>  
 
<inner>  
Entry(hash, key, value, next)
<inner>  
get(key)
<inner>  
getEntry(key)
<inner>  
<static>  
HashMap.hash(h)
Applies a supplemental hash function to a given hashcode, which defends against poor quality hash functions.
<static>  
HashMap.indexFor(h, length)
Return index for hash code h
<inner>  
 
put(key, value)
<inner>  
 
remove(key)
<inner>  
<inner>  
resize(newCapacity)
<inner>  
size()
<inner>  
transfer(newTable)
Class Detail
HashMap(compareFunc, hashFunc, initialCapacity, loadFactor)
Hash Map
Author: Sijie Guo .
Parameters:
{Function} compareFunc
function used for comparasion
{Function} hashFunc
function used to compute hash value
{Number} initialCapacity
initial map capacity
{Number} loadFactor
load factor
Method Detail
<inner> addEntry(hash, key, value, bucketIndex)
Parameters:
hash
key
value
bucketIndex

<inner> clear()

containsKey(key)
Parameters:
key

<inner> Entry(hash, key, value, next)
Parameters:
hash
key
value
next

<inner> get(key)
Parameters:
key

<inner> getEntry(key)
Parameters:
key

<inner> getForNullKey()

<static> HashMap.hash(h)
Applies a supplemental hash function to a given hashcode, which defends against poor quality hash functions.
Parameters:
{Number} h
a given hash code
Returns:
hash value

<static> HashMap.indexFor(h, length)
Return index for hash code h
Parameters:
{Number} h
a given hash code
{Number} length
length of current size
Returns:
index

<inner> isEmpty()

put(key, value)
Parameters:
key
value

<inner> putForNullKey(value)
Parameters:
value

remove(key)
Parameters:
key

<inner> removeEntryForKey(key)
Parameters:
key

<inner> resize(newCapacity)
Parameters:
newCapacity

<inner> size()

<inner> transfer(newTable)
Parameters:
newTable

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Mar 09 2011 23:15:16 GMT+0800 (CST)