FicComparableExtension extension
- on
Methods
-
compareObjectTo(
Object? other, {bool nullsBefore = false, bool compareHashCodes = true}) → int -
If this object and
other
are bothnull
, they don't have order. If one of them isnull
, it will come later, unless thenullsBefore
istrue
, in which case thenull
will come before.Otherwise, if this object and
other
are both of type Comparable, compare them with their natural comparator.Otherwise, if this object and
other
are map-entries (MapEntry
), compare theirkey
s. If theirkey
s compare as the same, then compare theirvalue
s.Otherwise, if this object and
other
are booleans, compare them such astrue
comes afterfalse
.Otherwise, return
0
, which means unordered.