Comparing class

Class with helper methods that allow for easier creation of Comparators.

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

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

join<T>(List<Comparable Function(T t)> mappers) Comparator<T>
Join several mappers and compare in order (first the first element, then the second, and so on).
mapping<T, V>(Comparator<T> comparator, T mapper(V v)) Comparator<V>
Use if you already have a custom comparator you wish to use but your list needs some mapping to get to the comparator's type. I.e., creates a Comparator
on<T>(Comparable mapper(T t)) Comparator<T>
Returns a Comparator that compares objects of type T by mapping them to Comparables.
reverse<T>(Comparator<T> comparator) Comparator<T>
Reverses a given comparator, that is, change it from ascending to descending or vice-versa.