@Override
  public int compare(Pair o1, Pair o2) {
    int result = xComparator.compare(o1.getX(), o2.getX());
    if (result == 0) {
      result = yComparator.compare(o1.getY(), o2.getY());
    }
    return result;
  }
A comparator for Pair objects that uses two passed in comparators.
geode-core/src/main/java/org/apache/geode/internal/cache/persistence/query/mock/PairComparator.java