@Override
    public int compare(SimpleRange sr1, SimpleRange sr2) {
      ComparisonChain cc = ComparisonChain.start();
      cc = cc.compare(sr1.getStartKey(), sr2.getStartKey(), Bytes.BYTES_COMPARATOR);
      cc = cc.compare(sr1.getEndKey(), sr2.getEndKey(), RegionSplitCalculator.BYTES_COMPARATOR);
      cc = cc.compare(sr1.tiebreaker, sr2.tiebreaker);
      return cc.result();
    }
This is range uses a user specified start and end keys. It also has an extra tiebreaker so that
different ranges with the same start/end key pair count as different regions.
hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionSplitCalculator.java