HashMapSync
class in package klyn.collections

    public class HashMapSync<K, V> extends MapSync<K, V>:

Object
└ MapSync
└ HashMapSync

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

Properties inherited from MapSync: size
Properties inherited from Object: type
Properties inherited from MapCollection: size
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | HashMapSync `HashMapSync():` | Creates an empty synchronized hash map.
public | HashMapSync `HashMapSync(keys as IList<K>, values as IList<V>):` | Creates a synchronized hash map from key-value pairs.
public | HashMapSync `HashMapSync(map as MapCollection<K, V>):` | Creates a synchronized hash map from another map.

Methods inherited from MapSync: clear, containsValue, items, keys, remove, toString, values
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml
Methods inherited from MapCollection: clear, containsValue, items, keys, remove, values
Operators

Modifier and Type | Member | Description
--- | --- | ---
public native override | operator in(key as K) as Boolean | Returns true if the key exists.

Operators inherited from MapSync: operator in(key as K) as Boolean, operator[](key as K) as V
Operators inherited from MapCollection: operator in(key as K) as Boolean, operator[](key as K) as V