Beispiel #1
0
  @Override
  public int compareTo(Commit other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMessage()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAuthor()).compareTo(other.isSetAuthor());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAuthor()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.author, other.author);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Beispiel #2
0
 /** Performs a deep copy on <i>other</i>. */
 public Commit(Commit other) {
   if (other.isSetMessage()) {
     this.message = other.message;
   }
   if (other.isSetAuthor()) {
     this.author = new CommitAuthor(other.author);
   }
 }
Beispiel #3
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, Commit struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetMessage()) {
     optionals.set(0);
   }
   if (struct.isSetAuthor()) {
     optionals.set(1);
   }
   oprot.writeBitSet(optionals, 2);
   if (struct.isSetMessage()) {
     oprot.writeString(struct.message);
   }
   if (struct.isSetAuthor()) {
     struct.author.write(oprot);
   }
 }
Beispiel #4
0
  public boolean equals(Commit that) {
    if (that == null) return false;

    boolean this_present_message = true && this.isSetMessage();
    boolean that_present_message = true && that.isSetMessage();
    if (this_present_message || that_present_message) {
      if (!(this_present_message && that_present_message)) return false;
      if (!this.message.equals(that.message)) return false;
    }

    boolean this_present_author = true && this.isSetAuthor();
    boolean that_present_author = true && that.isSetAuthor();
    if (this_present_author || that_present_author) {
      if (!(this_present_author && that_present_author)) return false;
      if (!this.author.equals(that.author)) return false;
    }

    return true;
  }