A parallel iterator returning all the entries.
Creates new entry to be immediately inserted into the hashtable.
Creates new entry to be immediately inserted into the hashtable. This method is guaranteed to be called only once and in case that the entry will be added. In other words, an implementation may be side-effecting.
Add entry to table pre: no entry with same key exists
Add entry to table pre: no entry with same key exists
Remove all entries from table
Remove all entries from table
An iterator returning all entries.
An iterator returning all entries.
Find entry with given key in table, null if not found.
Find entry with given key in table, null if not found.
Find entry with given key in table, or add new one if not found.
Find entry with given key in table, or add new one if not found.
May be somewhat faster then findEntry
/addEntry
pair as it
computes entry's hash index only once.
Returns entry found in table or null.
New entries are created by calling createNewEntry
method.
Avoid iterator for a 2x faster traversal.
Avoid iterator for a 2x faster traversal.
Defer to a high-quality hash in scala.util.hashing.
Defer to a high-quality hash in scala.util.hashing. The goal is to distribute across bins as well as possible even if a hash code has low entropy at some bits.
OLD VERSION - quick, but bad for sequence 0-10000 - little entropy in higher bits - since 2003
var h: Int = hcode + ~(hcode << 9) h = h ^ (h >>> 14) h = h + (h << 4) h ^ (h >>> 10)
the rest of the computation is due to SI-5293
Note: we take the most significant bits of the hashcode, not the lower ones this is of crucial importance when populating the table in parallel
Note: we take the most significant bits of the hashcode, not the lower ones this is of crucial importance when populating the table in parallel
The initial size of the hash table.
The initial size of the hash table.
Remove entry from table if present.
Remove entry from table if present.
The array keeping track of the number of elements in 32 element blocks.
The array keeping track of the number of elements in 32 element blocks.
The actual hash table.
The actual hash table.
The number of mappings contained in this hash table.
The number of mappings contained in this hash table.
The next size value at which to resize (capacity * load factor).
The next size value at which to resize (capacity * load factor).
Provides functionality for hash tables with linked list buckets, enriching the data structure by fulfilling certain requirements for their parallel construction and iteration.