SortedComparable<T, P extends Comparable?> class

Sorting rule that uses Comparable.compare to compare two items. Considers two nulls equal and one null always lesser than other values.

Inheritance

Constructors

SortedComparable(SortedMapper<T, P> mapper, {bool invert = false})

Properties

comparator Comparator<P>
finalinherited
hashCode int
The hash code for this object.
no setterinherited
invert bool
Whether to invert the sorting order.
finalinherited
mapper SortedMapper<T, P>
Function mapping an object to the desired property (or itself).
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compare(P a, P b) int
Compare two P properties returned by the mapper.
inherited
compareComplex(T a, T b) int
Compare two T objects.
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 ==(Object other) bool
The equality operator.
inherited