/** * Performs a deep copy on <i>other</i>. */ public ThriftOperationsServer(ThriftOperationsServer other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetId()) { this.id = other.id; } this.priority = other.priority; }
public boolean equals(ThriftOperationsServer that) { if (that == null) return false; boolean this_present_id = true && this.isSetId(); boolean that_present_id = true && that.isSetId(); if (this_present_id || that_present_id) { if (!(this_present_id && that_present_id)) return false; if (!this.id.equals(that.id)) return false; } boolean this_present_priority = true; boolean that_present_priority = true; if (this_present_priority || that_present_priority) { if (!(this_present_priority && that_present_priority)) return false; if (this.priority != that.priority) return false; } return true; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_id = true && (isSetId()); list.add(present_id); if (present_id) list.add(id); boolean present_priority = true; list.add(present_priority); if (present_priority) list.add(priority); 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 ID: return isSetId(); case PRIORITY: return isSetPriority(); } throw new IllegalStateException(); }
@Override public int compareTo(ThriftOperationsServer other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); if (lastComparison != 0) { return lastComparison; } if (isSetId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority()); if (lastComparison != 0) { return lastComparison; } if (isSetPriority()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.priority, other.priority); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, ThriftOperationsServer struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetId()) { optionals.set(0); } if (struct.isSetPriority()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetId()) { oprot.writeString(struct.id); } if (struct.isSetPriority()) { oprot.writeI32(struct.priority); } }