SetEquality<E> class

Equality of sets.

Two sets are considered equal if they have the same number of elements, and the elements of one set can be paired with the elements of the other set, so that each pair are equal.

This equality behaves the same as UnorderedIterableEquality except that it expects sets instead of iterables as arguments.

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

Constructors

SetEquality([Equality<E> elementEquality = const DefaultEquality() ])
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

isValidKey(Object o) bool
Test whether an object is a valid argument to equals and hash. [...]
override
equals(Set<E> elements1, Set<E> elements2) bool
Compare two elements for being equal. [...]
inherited
hash(Set<E> elements) int
Get a hashcode of an element. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited