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 | |
bool | matchKey (K a, K b) |
Definition at line 348 of file HashMap.d.
|
Definition at line 413 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 423 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 432 of file HashMap.d. References HashMap::hash, and table. Referenced by containsKey(), get(), and replace(). |
|
Return true if the two keys match Definition at line 443 of file HashMap.d. References HashMap::K. Referenced by containsKey(), get(), put(), remove(), and replace(). |
|
Definition at line 452 of file HashMap.d. References count, getFirst(), HashMap::HashEntry::hash, HashMap::hash, HashMap::K, HashMap::HashEntry::key, matchKey(), HashMap::HashEntry::next, HashMap::V, and HashMap::HashEntry::value. Referenced by HashMap::get(). |
|
Definition at line 480 of file HashMap.d. References count, getFirst(), HashMap::HashEntry::hash, HashMap::hash, HashMap::K, HashMap::HashEntry::key, matchKey(), and HashMap::HashEntry::next. Referenced by HashMap::containsKey(). |
|
Definition at line 501 of file HashMap.d. References getFirst(), HashMap::HashEntry::hash, HashMap::hash, HashMap::K, HashMap::HashEntry::key, matchKey(), HashMap::HashEntry::next, HashMap::V, and HashMap::HashEntry::value. Referenced by HashMap::replace(). |
|
Definition at line 518 of file HashMap.d. References count, HashMap::HashEntry::hash, HashMap::hash, HashMap::K, HashMap::HashEntry::key, matchKey(), HashMap::HashEntry::next, rehash(), table, threshold, HashMap::V, and HashMap::HashEntry::value. Referenced by HashMap::put(), and HashMap::putIfAbsent(). |
|
Definition at line 554 of file HashMap.d. References HashMap::HashEntry::hash, HashMap::HashEntry::key, 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 627 of file HashMap.d. References count, HashMap::HashEntry::hash, HashMap::hash, HashMap::K, HashMap::HashEntry::key, matchKey(), HashMap::HashEntry::next, table, HashMap::V, and HashMap::HashEntry::value. Referenced by HashMap::remove(). |
|
Definition at line 667 of file HashMap.d. Referenced by HashMap::clear(). |
|
The number of elements in this segment's region. Definition at line 390 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 397 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 403 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 411 of file HashMap.d. Referenced by rehash(), setTable(), and this(). |