@Override public int compareTo(PushResult other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode()); if (lastComparison != 0) { return lastComparison; } if (isSetCode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, other.code); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc()); if (lastComparison != 0) { return lastComparison; } if (isSetDesc()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc); if (lastComparison != 0) { return lastComparison; } } return 0; }