Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Member group

.ctor

Declaring type: HashMap<K, V>
Module: System.Collections
Assembly: System.Runtime.dll
Source file: HashMap.rvn

Overloads / Variants

.ctor

init(comparer: EqualityComparer<K>) -> void

Source file: HashMap.rvn

Creates an empty map retaining a reusable key policy.

Parameters

Name Type Description
comparer EqualityComparer<K> A non-null equality/hash policy, stable while keys are stored.

Remarks

Development overload after Preview 10. The policy defines the supported key domain. Reentering lookup or mutation from either comparer method faults. Existing callback construction remains supported.

.ctor

init(equal: (K, K) -> bool, hash: (K) -> int) -> void

Source file: HashMap.rvn

Parameters

Name Type Description
equal Function
hash Function

.ctor

init(items: Iterable<KeyValuePair<K, V>>, comparer: EqualityComparer<K>) -> void

Source file: HashMap.rvn

Copies pairs into independent storage using the supplied key policy.

Parameters

Name Type Description
items Iterable<KeyValuePair<K, V>> Pairs to enumerate once, including sequences, queries and existing maps.
comparer EqualityComparer<K> Explicit stable key policy; never inferred from the source.

Remarks

Native development API. Shallow independent storage. Duplicate keys cause a terminal Fault after iterator disposal. Use TryAdd for recoverable duplicates. Provider/comparer Faults do not guarantee cleanup. No concurrent snapshot guarantee.

.ctor

init(items: Iterable<KeyValuePair<K, V>>, equal: (K, K) -> bool, hash: (K) -> int) -> void

Source file: HashMap.rvn

Copies pairs using explicit equality and hash callbacks.

Parameters

Name Type Description
items Iterable<KeyValuePair<K, V>> Pairs to enumerate once.
equal Function Stable key equality callback.
hash Function Stable hash callback; equal keys must have equal hashes.

Remarks

Native development API. Uses the same shallow-copy, terminal duplicate Fault and disposal contract as the comparer overload.