Public Member Functions | |
this (int initialCapacity, float lf) | |
V | get (K key, uint hash) |
bool | containsKey (K key, uint hash) |
synchronized V | replace (K key, uint hash, V newValue) |
synchronized V | put (K key, uint hash, V value, bool onlyIfAbsent) |
Public Attributes | |
int | count |
int | threshold |
HashEntry[] | table |
float | loadFactor |
Private Member Functions | |
final void | setTable (HashEntry[] newTable) |
final HashEntry | getFirst (uint hash) |
final void | rehash () |
synchronized V | remove (K key, uint hash, V value) |
synchronized void | clear () |
Static Private Member Functions | |
static bool | matchKey (K a, K b) |
Definition at line 352 of file HashMap.d.
|
Definition at line 417 of file HashMap.d. References loadFactor, and setTable(). |
|
Set table to new HashEntry array. Call only while holding lock or in constructor. Definition at line 427 of file HashMap.d. References loadFactor, table, and threshold. Referenced by this(). |
|
Return properly casted first entry of bin for given hash Definition at line 436 of file HashMap.d. References table. Referenced by containsKey(), get(), and replace(). |
|
Return true if the two keys match Definition at line 447 of file HashMap.d. References memcmp(). Referenced by containsKey(), get(), put(), remove(), and replace(). |
|
Definition at line 456 of file HashMap.d. References count, getFirst(), HashMap::HashEntry::hash, HashMap::HashEntry::key, matchKey(), HashMap::HashEntry::next, and HashMap::HashEntry::value. Referenced by HashMap::get(). |
|
Definition at line 484 of file HashMap.d. References count, getFirst(), HashMap::HashEntry::hash, HashMap::HashEntry::key, matchKey(), and HashMap::HashEntry::next. Referenced by HashMap::containsKey(). |
|
Definition at line 505 of file HashMap.d. References getFirst(), HashMap::HashEntry::hash, HashMap::HashEntry::key, matchKey(), HashMap::HashEntry::next, and HashMap::HashEntry::value. Referenced by HashMap::replace(). |
|
Definition at line 522 of file HashMap.d. References count, HashMap::HashEntry::hash, HashMap::HashEntry::key, matchKey(), HashMap::HashEntry::next, rehash(), table, threshold, and HashMap::HashEntry::value. Referenced by HashMap::put(), and HashMap::putIfAbsent(). |
|
Definition at line 558 of file HashMap.d. References HashMap::HashEntry::hash, loadFactor, HashMap::HashEntry::next, table, threshold, and HashMap::HashEntry::value. Referenced by put(). |
|
Remove; match on key only if value null, else match both. Definition at line 631 of file HashMap.d. References count, HashMap::HashEntry::hash, HashMap::HashEntry::key, matchKey(), HashMap::HashEntry::next, table, and HashMap::HashEntry::value. Referenced by HashMap::remove(). |
|
Definition at line 671 of file HashMap.d. Referenced by HashMap::clear(). |
|
The number of elements in this segment's region. Definition at line 394 of file HashMap.d. Referenced by HashMap::HashIterator::advance(), clear(), containsKey(), get(), put(), and remove(). |
|
The table is rehashed when its size exceeds this threshold. (The value of this field is always (int)(capacity * loadFactor).) Definition at line 401 of file HashMap.d. Referenced by put(), rehash(), and setTable(). |
|
The per-segment table. Declared as a raw type, casted to HashEntry<K,V> on each use. Definition at line 407 of file HashMap.d. Referenced by HashMap::HashIterator::advance(), clear(), getFirst(), put(), rehash(), remove(), and setTable(). |
|
The load factor for the hash table. Even though this value is same for all segments, it is replicated to avoid needing links to outer object. Definition at line 415 of file HashMap.d. Referenced by rehash(), setTable(), and this(). |