HashMap<K, V>.identity constructor Null safety

HashMap<K, V>.identity()

Creates an unordered identity-based map.

Keys of this map are considered equal only to the same object, and does not use Object.== at all.

Effectively a shorthand for:

HashMap<K, V>(equals: identical, hashCode: identityHashCode)

Implementation

external factory HashMap.identity();