static bool eqWithComparator(Comparator comparator, A a, A b) { ret comparator == null ? eq(a, b) : comparator.compare(a, b) == 0; }