Public Member Functions | |
V | opIndex (K k) |
Looks up a value. | |
V | opIndexAssign (V v, K k) |
Sets a value. | |
bool | contains (K k) |
Check whether a key is contained. | |
V | remove (K k) |
Removes an entry. | |
Map | rehash () |
Rehashes the array in place. | |
int | opApply (int public(*dg)(inout V)) |
Iterates over the values in the map. | |
int | opApply (int public(*dg)(inout K, inout V)) |
Iterates over the keys and values in the map. |
Unlike the current implementation of D's built-in associative arrays, this doesn't rely on an ordering comparator, so it will work even if the key type has no ordering or unequal objects can rank equally in order.
V smjg.libs.util.hashmap.THashMap< K, V >.Map.opIndex | ( | K | k | ) |
Looks up a value.
Implementation of this[k].
k | key to look up. |
V smjg.libs.util.hashmap.THashMap< K, V >.Map.opIndexAssign | ( | V | v, | |
K | k | |||
) |
Sets a value.
Implementation of this[k] = v.
k | key to set. | |
v | value to assign to key. |
bool smjg.libs.util.hashmap.THashMap< K, V >.Map.contains | ( | K | k | ) |
Check whether a key is contained.
k | key to check. |
V smjg.libs.util.hashmap.THashMap< K, V >.Map.remove | ( | K | k | ) |
Removes an entry.
k | key to remove. |
V.init | if the key was not present. |
Map smjg.libs.util.hashmap.THashMap< K, V >.Map.rehash | ( | ) |
Rehashes the array in place.
int smjg.libs.util.hashmap.THashMap< K, V >.Map.opApply | ( | int public(*)(inout V) | dg | ) |
Iterates over the values in the map.
(Implementation of foreach(V; Map).)
Modifying the map while foreach is in progress, other than by an inout value variable in the foreach loop, currently leads to undefined behaviour.
int smjg.libs.util.hashmap.THashMap< K, V >.Map.opApply | ( | int public(*)(inout K, inout V) | dg | ) |
Iterates over the keys and values in the map.
(Implementation of foreach(K, V; Map).)
Modifying the map while foreach is in progress, other than by an inout value variable in the foreach loop, currently leads to undefined behaviour.