@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_serviceName = true && (isSetServiceName()); list.add(present_serviceName); if (present_serviceName) list.add(serviceName); boolean present_tags = true && (isSetTags()); list.add(present_tags); if (present_tags) list.add(tags); 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 SERVICE_NAME: return isSetServiceName(); case TAGS: return isSetTags(); } throw new IllegalStateException(); }
public boolean equals(Process that) { if (that == null) return false; boolean this_present_serviceName = true && this.isSetServiceName(); boolean that_present_serviceName = true && that.isSetServiceName(); if (this_present_serviceName || that_present_serviceName) { if (!(this_present_serviceName && that_present_serviceName)) return false; if (!this.serviceName.equals(that.serviceName)) return false; } boolean this_present_tags = true && this.isSetTags(); boolean that_present_tags = true && that.isSetTags(); if (this_present_tags || that_present_tags) { if (!(this_present_tags && that_present_tags)) return false; if (!this.tags.equals(that.tags)) return false; } return true; }
@Override public String toString() { StringBuilder sb = new StringBuilder("Process("); boolean first = true; sb.append("serviceName:"); if (this.serviceName == null) { sb.append("null"); } else { sb.append(this.serviceName); } first = false; if (isSetTags()) { if (!first) sb.append(", "); sb.append("tags:"); if (this.tags == null) { sb.append("null"); } else { sb.append(this.tags); } first = false; } sb.append(")"); return sb.toString(); }
/** * Performs a deep copy on <i>other</i>. */ public Process(Process other) { if (other.isSetServiceName()) { this.serviceName = other.serviceName; } if (other.isSetTags()) { List<Tag> __this__tags = new ArrayList<Tag>(other.tags.size()); for (Tag other_element : other.tags) { __this__tags.add(new Tag(other_element)); } this.tags = __this__tags; } }
@Override public int compareTo(Process other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetServiceName()).compareTo(other.isSetServiceName()); if (lastComparison != 0) { return lastComparison; } if (isSetServiceName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceName, other.serviceName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTags()).compareTo(other.isSetTags()); if (lastComparison != 0) { return lastComparison; } if (isSetTags()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tags, other.tags); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Process struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.serviceName); BitSet optionals = new BitSet(); if (struct.isSetTags()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetTags()) { { oprot.writeI32(struct.tags.size()); for (Tag _iter36 : struct.tags) { _iter36.write(oprot); } } } }
public void write(org.apache.thrift.protocol.TProtocol oprot, Process struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.serviceName != null) { oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC); oprot.writeString(struct.serviceName); oprot.writeFieldEnd(); } if (struct.tags != null) { if (struct.isSetTags()) { oprot.writeFieldBegin(TAGS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tags.size())); for (Tag _iter35 : struct.tags) { _iter35.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }