@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_role = true && (isSetRole()); builder.append(present_role); if (present_role) builder.append(role); boolean present_addGroups = true && (isSetAddGroups()); builder.append(present_addGroups); if (present_addGroups) builder.append(addGroups); boolean present_delGroups = true && (isSetDelGroups()); builder.append(present_delGroups); if (present_delGroups) builder.append(delGroups); return builder.toHashCode(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case ROLE: return isSetRole(); case ADD_GROUPS: return isSetAddGroups(); case DEL_GROUPS: return isSetDelGroups(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public TRoleChanges(TRoleChanges other) { if (other.isSetRole()) { this.role = other.role; } if (other.isSetAddGroups()) { List<String> __this__addGroups = new ArrayList<String>(); for (String other_element : other.addGroups) { __this__addGroups.add(other_element); } this.addGroups = __this__addGroups; } if (other.isSetDelGroups()) { List<String> __this__delGroups = new ArrayList<String>(); for (String other_element : other.delGroups) { __this__delGroups.add(other_element); } this.delGroups = __this__delGroups; } }
lastComparison = Boolean.valueOf(isSetAddGroups()).compareTo(typedOther.isSetAddGroups()); if (lastComparison != 0) { return lastComparison; if (isSetAddGroups()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addGroups, typedOther.addGroups); if (lastComparison != 0) {
public boolean equals(TRoleChanges that) { if (that == null) return false; boolean this_present_role = true && this.isSetRole(); boolean that_present_role = true && that.isSetRole(); if (this_present_role || that_present_role) { if (!(this_present_role && that_present_role)) return false; if (!this.role.equals(that.role)) return false; } boolean this_present_addGroups = true && this.isSetAddGroups(); boolean that_present_addGroups = true && that.isSetAddGroups(); if (this_present_addGroups || that_present_addGroups) { if (!(this_present_addGroups && that_present_addGroups)) return false; if (!this.addGroups.equals(that.addGroups)) return false; } boolean this_present_delGroups = true && this.isSetDelGroups(); boolean that_present_delGroups = true && that.isSetDelGroups(); if (this_present_delGroups || that_present_delGroups) { if (!(this_present_delGroups && that_present_delGroups)) return false; if (!this.delGroups.equals(that.delGroups)) return false; } return true; }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetRole()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'role' is unset! Struct:" + toString()); } if (!isSetAddGroups()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'addGroups' is unset! Struct:" + toString()); } if (!isSetDelGroups()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'delGroups' is unset! Struct:" + toString()); } // check for sub-struct validity }