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).
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
Eqthat gives the result of and ofeq1andeq2. -
contramap<
A> (T map(A)) → Eq< A> -
Return an Eq instance based on a parameter of type
Textracted from a classA. -
eqv(
T x, T y) → bool -
Returns
trueifxandyare equivalent,falseotherwise. -
neqv(
T x, T y) → bool -
Returns
falseifxandyare equivalent,trueotherwise. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
or(
Eq< T> eq) → Eq<T> -
Return an
Eqthat 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
Eqthat 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
Eqforboolusing the standard==operator.getter/setter pair -
eqDouble
↔ Eq<
double> -
Instance of
Eqfordoubleusing the standard==operator.getter/setter pair -
eqInt
↔ Eq<
int> -
Instance of
Eqforintusing the standard==operator.getter/setter pair -
eqNum
↔ Eq<
num> -
Instance of
Eqfornumusing the standard==operator.getter/setter pair -
eqString
↔ Eq<
String> -
Instance of
EqforStringusing the standard==operator.getter/setter pair
Static Methods
-
allEqual<
A> () → Eq< A> -
An
Eq<A>in which everything is the same (callingeqvreturns 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
Eqinstance from aneqvimplementation.