public int compareTo(TStructField other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TStructField typedOther = (TStructField) other; lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetComment()).compareTo(typedOther.isSetComment()); if (lastComparison != 0) { return lastComparison; } if (isSetComment()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, typedOther.comment); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** Performs a deep copy on <i>other</i>. */ public TStructField(TStructField other) { if (other.isSetName()) { this.name = other.name; } if (other.isSetComment()) { this.comment = other.comment; } }
public boolean equals(TStructField that) { if (that == null) return false; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_comment = true && this.isSetComment(); boolean that_present_comment = true && that.isSetComment(); if (this_present_comment || that_present_comment) { if (!(this_present_comment && that_present_comment)) return false; if (!this.comment.equals(that.comment)) return false; } return true; }