/** * Performs a deep copy on <i>other</i>. */ public ThriftSecurityException(ThriftSecurityException other) { if (other.isSetUser()) { this.user = other.user; } if (other.isSetCode()) { this.code = other.code; } }
/** 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 java.lang.IllegalArgumentException(); } switch (field) { case USER: return isSetUser(); case CODE: return isSetCode(); } throw new java.lang.IllegalStateException(); }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287); if (isSetUser()) hashCode = hashCode * 8191 + user.hashCode(); hashCode = hashCode * 8191 + ((isSetCode()) ? 131071 : 524287); if (isSetCode()) hashCode = hashCode * 8191 + code.getValue(); return hashCode; }
@Override public int compareTo(ThriftSecurityException other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); if (lastComparison != 0) { return lastComparison; } if (isSetUser()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.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; } } return 0; }
public boolean equals(ThriftSecurityException that) { if (that == null) return false; if (this == that) return true; boolean this_present_user = true && this.isSetUser(); boolean that_present_user = true && that.isSetUser(); if (this_present_user || that_present_user) { if (!(this_present_user && that_present_user)) return false; if (!this.user.equals(that.user)) return false; } boolean this_present_code = true && this.isSetCode(); boolean that_present_code = true && that.isSetCode(); if (this_present_code || that_present_code) { if (!(this_present_code && that_present_code)) return false; if (!this.code.equals(that.code)) return false; } return true; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, ThriftSecurityException struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetUser()) { optionals.set(0); } if (struct.isSetCode()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetUser()) { oprot.writeString(struct.user); } if (struct.isSetCode()) { oprot.writeI32(struct.code.getValue()); } }