CompareOperators<T> mixin
A generic mixin that provides standard comparison operators like
<
, <=
, >=
and >
provided the class is Comparable
.
- Implemented types
-
- Comparable<
T>
- Comparable<
- Mixin applications
- Available extensions
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
-
between(
T min, T max) → bool -
Available on Comparable<
Returns true, if this Comparable is betweenT> , provided by the ComparableExtension extensionmin
andmax
(inclusive). -
clip(
T min, T max) → T -
Available on Comparable<
Clips (limits) this Comparable to the range fromT> , provided by the ComparableExtension extensionmin
tomax
. -
compareTo(
T other) → int -
Compares this object to another object.
inherited
-
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 <(
T other) → bool -
operator <=(
T other) → bool -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
T other) → bool -
operator >=(
T other) → bool