@Override
  public int compareTo(THRegionInfo other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetRegionId(), other.isSetRegionId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRegionId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regionId, other.regionId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableName(), other.isSetTableName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStartKey(), other.isSetStartKey());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStartKey()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startKey, other.startKey);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEndKey(), other.isSetEndKey());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEndKey()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endKey, other.endKey);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOffline(), other.isSetOffline());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOffline()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offline, other.offline);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSplit(), other.isSetSplit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSplit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.split, other.split);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReplicaId(), other.isSetReplicaId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReplicaId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicaId, other.replicaId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java