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
ifx
andy
are equivalent,false
otherwise. -
neqv(
T x, T y) → bool -
Returns
false
ifx
andy
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 (callingeqv
returns alwaystrue
). -
and<
A> (Eq< A> eq1, Eq<A> eq2) → Eq<A> -
Return an
Eq
that gives the result of the and ofeq1
andeq2
. -
by<
A, B> (B f(A a), Eq< B> eq) → Eq<A> -
Convert an implicit
Eq<B>
to anEq<A>
using the given functionf
. -
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 aneqv
implementation. -
or<
A> (Eq< A> eq1, Eq<A> eq2) → Eq<A> -
Return an
Eq
that gives the result of the or ofeq1
andeq2
.