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

and(
Eq< T> eq) → Eq<T> 
Return an
Eq
that gives the result of and ofeq1
andeq2
. 
contramap<
A> (T map(A)) → Eq< A> 
Return an Eq instance based on a parameter of type
T
extracted from a classA
. 
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

or(
Eq< T> eq) → Eq<T> 
Return an
Eq
that gives the result of or of this Eq andeq
. 
toString(
) → String 
A string representation of this object.
inherited

xor(
Eq< T> eq) → Eq<T> 
Return an
Eq
that gives the result of xor of this Eq andeq
.
Operators

operator ==(
Object other) → bool 
The equality operator.
inherited
Static Properties

dateEqDay
↔ Eq<
DateTime> 
Eq instance to compare DateTime days.
getter/setter pair

dateEqMonth
↔ Eq<
DateTime> 
Eq instance to compare DateTime months.
getter/setter pair

dateEqYear
↔ Eq<
DateTime> 
Eq instance to compare DateTime years.
getter/setter pair

dateEqYearMonthDay
↔ Eq<
DateTime> 
Eq instance to compare DateTime by year, month, and day.
getter/setter pair

eqBool
↔ Eq<
bool> 
Instance of
Eq
forbool
using the standard==
operator.getter/setter pair 
eqDouble
↔ Eq<
double> 
Instance of
Eq
fordouble
using the standard==
operator.getter/setter pair 
eqInt
↔ Eq<
int> 
Instance of
Eq
forint
using the standard==
operator.getter/setter pair 
eqNum
↔ Eq<
num> 
Instance of
Eq
fornum
using the standard==
operator.getter/setter pair 
eqString
↔ Eq<
String> 
Instance of
Eq
forString
using the standard==
operator.getter/setter pair
Static Methods

allEqual<
A> () → Eq< A> 
An
Eq<A>
in which everything is the same (callingeqv
returns alwaystrue
). 
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.