/** * Performs a deep copy on <i>other</i>. */ public EventClassFamilyVersion(EventClassFamilyVersion other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetEndpointClassFamilyId()) { this.endpointClassFamilyId = other.endpointClassFamilyId; } this.endpointClassFamilyVersion = other.endpointClassFamilyVersion; }
public boolean equals(EventClassFamilyVersion that) { if (that == null) return false; boolean this_present_endpointClassFamilyId = true && this.isSetEndpointClassFamilyId(); boolean that_present_endpointClassFamilyId = true && that.isSetEndpointClassFamilyId(); if (this_present_endpointClassFamilyId || that_present_endpointClassFamilyId) { if (!(this_present_endpointClassFamilyId && that_present_endpointClassFamilyId)) return false; if (!this.endpointClassFamilyId.equals(that.endpointClassFamilyId)) return false; } boolean this_present_endpointClassFamilyVersion = true; boolean that_present_endpointClassFamilyVersion = true; if (this_present_endpointClassFamilyVersion || that_present_endpointClassFamilyVersion) { if (!(this_present_endpointClassFamilyVersion && that_present_endpointClassFamilyVersion)) return false; if (this.endpointClassFamilyVersion != that.endpointClassFamilyVersion) return false; } return true; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_endpointClassFamilyId = true && (isSetEndpointClassFamilyId()); list.add(present_endpointClassFamilyId); if (present_endpointClassFamilyId) list.add(endpointClassFamilyId); boolean present_endpointClassFamilyVersion = true; list.add(present_endpointClassFamilyVersion); if (present_endpointClassFamilyVersion) list.add(endpointClassFamilyVersion); return list.hashCode(); }
/** 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 ENDPOINT_CLASS_FAMILY_ID: return isSetEndpointClassFamilyId(); case ENDPOINT_CLASS_FAMILY_VERSION: return isSetEndpointClassFamilyVersion(); } throw new IllegalStateException(); }
@Override public int compareTo(EventClassFamilyVersion other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetEndpointClassFamilyId()).compareTo(other.isSetEndpointClassFamilyId()); if (lastComparison != 0) { return lastComparison; } if (isSetEndpointClassFamilyId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endpointClassFamilyId, other.endpointClassFamilyId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEndpointClassFamilyVersion()).compareTo(other.isSetEndpointClassFamilyVersion()); if (lastComparison != 0) { return lastComparison; } if (isSetEndpointClassFamilyVersion()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endpointClassFamilyVersion, other.endpointClassFamilyVersion); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, EventClassFamilyVersion struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetEndpointClassFamilyId()) { optionals.set(0); } if (struct.isSetEndpointClassFamilyVersion()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetEndpointClassFamilyId()) { oprot.writeString(struct.endpointClassFamilyId); } if (struct.isSetEndpointClassFamilyVersion()) { oprot.writeI32(struct.endpointClassFamilyVersion); } }