MapEquality<K, V> class

Equality on maps.

Two maps are equal if they have the same number of entries, and if the entries of the two maps are pairwise equal on both key and value.

The equals and hash methods accepts null values, even if the isValidKey returns false for null. The hash of null is null.hashCode.

Implemented types

Constructors

MapEquality({Equality<K> keys = const DefaultEquality<Never>(), Equality<V> values = const DefaultEquality<Never>()})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

equals(Map<K, V>? map1, Map<K, V>? map2) bool
Compare two elements for being equal.
override
hash(Map<K, V>? map) int
Creates a combined hash code for a number of objects.
override
isValidKey(Object? o) bool
Test whether an object is a valid argument to equals and hash.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited