if (isSetDuration()) { if (!first) sb.append(", "); sb.append("duration:");
/** 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 TIMESTAMP: return isSetTimestamp(); case VALUE: return isSetValue(); case HOST: return isSetHost(); case DURATION: return isSetDuration(); } throw new IllegalStateException(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Annotation struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); if (struct.value != null) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeString(struct.value); oprot.writeFieldEnd(); } if (struct.host != null) { if (struct.isSetHost()) { oprot.writeFieldBegin(HOST_FIELD_DESC); struct.host.write(oprot); oprot.writeFieldEnd(); } } if (struct.isSetDuration()) { oprot.writeFieldBegin(DURATION_FIELD_DESC); oprot.writeI32(struct.duration); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
lastComparison = Boolean.valueOf(isSetDuration()).compareTo(typedOther.isSetDuration()); if (lastComparison != 0) { return lastComparison; if (isSetDuration()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.duration, typedOther.duration); if (lastComparison != 0) {
boolean this_present_duration = true && this.isSetDuration(); boolean that_present_duration = true && that.isSetDuration(); if (this_present_duration || that_present_duration) { if (!(this_present_duration && that_present_duration))
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTimestamp()) { optionals.set(0); } if (struct.isSetValue()) { optionals.set(1); } if (struct.isSetHost()) { optionals.set(2); } if (struct.isSetDuration()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetValue()) { oprot.writeString(struct.value); } if (struct.isSetHost()) { struct.host.write(oprot); } if (struct.isSetDuration()) { oprot.writeI32(struct.duration); } }