thenCompare method

Comparator<T> thenCompare(
  1. Comparator<T> comparator
)

Returns a Comparator that breaks a tie of this comparator by delegating to another comparator.

Implementation

Comparator<T> thenCompare(Comparator<T> comparator) => (a, b) {
      final result = this(a, b);
      if (result != 0) return result;
      return comparator(a, b);
    };