/** 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); } }