Eq<T> class abstract

A type class used to determine equality between 2 instances of the same type T. Any 2 instances x and y are equal if eqv(x, y) is true.

Moreover, eqv should form an equivalence relation (a binary relation that is reflexive, symmetric, and transitive).

Implementers

Constructors

Eq()
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

eqv(T x, T y) bool
Returns true if x and y are equivalent, false otherwise.
neqv(T x, T y) bool
Returns false if x and y are equivalent, true otherwise.
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

Static Methods

allEqual<A>() Eq<A>
An Eq<A> in which everything is the same (calling eqv returns always true).
and<A>(Eq<A> eq1, Eq<A> eq2) Eq<A>
Return an Eq that gives the result of the and of eq1 and eq2.
by<A, B>(B f(A a), Eq<B> eq) Eq<A>
Convert an implicit Eq<B> to an Eq<A> using the given function f.
fromUniversalEquals<A>() Eq<A>
An Eq<A> that delegates to universal equality (==).
instance<A>(bool f(A a1, A a2)) Eq<A>
Create an Eq instance from an eqv implementation.
or<A>(Eq<A> eq1, Eq<A> eq2) Eq<A>
Return an Eq that gives the result of the or of eq1 and eq2.