comparator library
Provides default Comparator constructors, and various static extension methods to modify and perform common operations on Comparator functions.
Mixins
-
CompareOperators<
T> -
A generic mixin that provides standard comparison operators like
<
,<=
,>=
and>
provided the class isComparable
.
Extensions
-
CompoundComparator
on Comparator<
T> -
CompoundIterableComparator
on Iterable<
Comparator< T> > -
LargestComparator
on Comparator<
T> -
LexicographicalComparator
on Comparator<
T> -
MinMaxComparator
on Comparator<
T> -
NullsFirstComparator
on Comparator<
T> -
NullsLastComparator
on Comparator<
T> -
OrderedComparator
on Comparator<
T> -
PredicateComparator
on Comparator<
T> -
ResultOfComparator
on Comparator<
R> -
ReversedComparator
on Comparator<
T> -
SearchComparator
on Comparator<
T> -
SmallestComparator
on Comparator<
T> -
SortComparator
on Comparator<
T>
Functions
-
explicitComparator<
T> (Iterable< T> iterable) → Comparator<T> -
Returns an explicit Comparator based on an
iterable
of elements. -
naturalComparable<
T extends Comparable< (T> >T a, T b) → int - Natural static Comparator function using Comparable arguments.
-
naturalCompare(
Object? a, Object? b) → int - Natural dynamic Comparator function.
-
reverseComparable<
T extends Comparable< (T> >T a, T b) → int - Reversed static Comparator function using Comparable arguments.
-
reverseCompare(
Object? a, Object? b) → int - Reversed dynamic Comparator function.