public int compareTo()

in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/dhratchet/message/thrift/DHRatchetMessageStruct.java [369:407]


  public int compareTo(DHRatchetMessageStruct other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.valueOf(isSetPeerNum()).compareTo(other.isSetPeerNum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPeerNum()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.peerNum, other.peerNum);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetRatchetKey()).compareTo(other.isSetRatchetKey());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRatchetKey()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ratchetKey, other.ratchetKey);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetCiphertext()).compareTo(other.isSetCiphertext());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCiphertext()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ciphertext, other.ciphertext);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }