/** 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 MESSAGES: return isSetMessages(); } throw new IllegalStateException(); }
public int compareTo(Log_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; Log_args typedOther = (Log_args)other; lastComparison = Boolean.valueOf(isSetMessages()).compareTo(typedOther.isSetMessages()); if (lastComparison != 0) { return lastComparison; } if (isSetMessages()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.messages, typedOther.messages); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** * Performs a deep copy on <i>other</i>. */ public Log_args(Log_args other) { if (other.isSetMessages()) { List<LogEntry> __this__messages = new ArrayList<LogEntry>(); for (LogEntry other_element : other.messages) { __this__messages.add(new LogEntry(other_element)); } this.messages = __this__messages; } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Log_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMessages()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetMessages()) { { oprot.writeI32(struct.messages.size()); for (LogEntry _iter4 : struct.messages) { _iter4.write(oprot); } } } }
public boolean equals(Log_args that) { if (that == null) return false; boolean this_present_messages = true && this.isSetMessages(); boolean that_present_messages = true && that.isSetMessages(); if (this_present_messages || that_present_messages) { if (!(this_present_messages && that_present_messages)) return false; if (!this.messages.equals(that.messages)) return false; } return true; }