public class HashMapSync<K, V> extends MapSync<K, V>:
Thread-safe hash map implementation.
HashMapSync<K, V> exposes the same typed API as HashMap<K, V> and uses the hash-backed native runtime path with synchronized instance storage. Average add, lookup and remove remain O(1), with the expected lock overhead for shared mutable access.
@param <K> Key type. @param <V> Value type. @since 1.0
| Modifier and Type | Member | Description |
|---|---|---|
| public | HashMapSyncHashMapSync(): |
Creates an empty synchronized hash map. |
| public | HashMapSyncHashMapSync(keys as IList<K>, values as IList<V>): |
Creates a synchronized hash map from key-value pairs. |
| public | HashMapSyncHashMapSync(map as MapCollection<K, V>): |
Creates a synchronized hash map from another map. |
| Modifier and Type | Member | Description |
|---|---|---|
| public native override | operator in(key as K) as Boolean | Returns true if the key exists. |