class KeyComparator implements Comparator<CKeyValue> {

  @Override
  public int compare(CKeyValue arg0, CKeyValue arg1) {
    LexicographicBytesComparator comparator = LexicographicBytesComparator.INSTANCE;
    int compare = comparator.compare(arg0.getRowId(), arg1.getRowId());
    if (compare == 0) {
      compare = comparator.compare(arg0.getFamily(), arg1.getFamily());
      if (compare == 0)
        compare = comparator.compare(arg0.getQualifier(), arg1.getQualifier());
    }
    return compare;
  }

  private  KeyComparator();

}