HashMapSync
classin packageklyn.collections
public class HashMapSync<K, V> extends MapSync<K, V>:
└ 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.

Since

1.0

Inherited Properties
propertyInherited Properties from MapSync: size
propertyInherited Properties from Object: type
propertyInherited Properties from MapCollection: size
Constructors
Modifier and Type Member Description
public 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.
Inherited Methods
methodInherited Methods from MapSync: clear, containsValue, get, items, keys, remove, toString, values
methodInherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml
methodInherited Methods from MapCollection: clear, containsValue, get, 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.
Inherited Operators
operatorInherited Operators from MapSync: operator in(key as K) as Boolean, operator[](key as K) as V
operatorInherited Operators from MapCollection: operator in(key as K) as Boolean, operator[](key as K) as V