public boolean equals()

in finagle-thrift/src/main/java/com/twitter/finagle/thrift/thrift/RequestHeader.java [664:761]


  public boolean equals(RequestHeader that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_trace_id = true;
    boolean that_present_trace_id = true;
    if (this_present_trace_id || that_present_trace_id) {
      if (!(this_present_trace_id && that_present_trace_id))
        return false;
      if (this.trace_id != that.trace_id)
        return false;
    }

    boolean this_present_span_id = true;
    boolean that_present_span_id = true;
    if (this_present_span_id || that_present_span_id) {
      if (!(this_present_span_id && that_present_span_id))
        return false;
      if (this.span_id != that.span_id)
        return false;
    }

    boolean this_present_parent_span_id = true && this.isSetParent_span_id();
    boolean that_present_parent_span_id = true && that.isSetParent_span_id();
    if (this_present_parent_span_id || that_present_parent_span_id) {
      if (!(this_present_parent_span_id && that_present_parent_span_id))
        return false;
      if (this.parent_span_id != that.parent_span_id)
        return false;
    }

    boolean this_present_sampled = true && this.isSetSampled();
    boolean that_present_sampled = true && that.isSetSampled();
    if (this_present_sampled || that_present_sampled) {
      if (!(this_present_sampled && that_present_sampled))
        return false;
      if (this.sampled != that.sampled)
        return false;
    }

    boolean this_present_client_id = true && this.isSetClient_id();
    boolean that_present_client_id = true && that.isSetClient_id();
    if (this_present_client_id || that_present_client_id) {
      if (!(this_present_client_id && that_present_client_id))
        return false;
      if (!this.client_id.equals(that.client_id))
        return false;
    }

    boolean this_present_flags = true && this.isSetFlags();
    boolean that_present_flags = true && that.isSetFlags();
    if (this_present_flags || that_present_flags) {
      if (!(this_present_flags && that_present_flags))
        return false;
      if (this.flags != that.flags)
        return false;
    }

    boolean this_present_contexts = true && this.isSetContexts();
    boolean that_present_contexts = true && that.isSetContexts();
    if (this_present_contexts || that_present_contexts) {
      if (!(this_present_contexts && that_present_contexts))
        return false;
      if (!this.contexts.equals(that.contexts))
        return false;
    }

    boolean this_present_dest = true && this.isSetDest();
    boolean that_present_dest = true && that.isSetDest();
    if (this_present_dest || that_present_dest) {
      if (!(this_present_dest && that_present_dest))
        return false;
      if (!this.dest.equals(that.dest))
        return false;
    }

    boolean this_present_delegations = true && this.isSetDelegations();
    boolean that_present_delegations = true && that.isSetDelegations();
    if (this_present_delegations || that_present_delegations) {
      if (!(this_present_delegations && that_present_delegations))
        return false;
      if (!this.delegations.equals(that.delegations))
        return false;
    }

    boolean this_present_trace_id_high = true && this.isSetTrace_id_high();
    boolean that_present_trace_id_high = true && that.isSetTrace_id_high();
    if (this_present_trace_id_high || that_present_trace_id_high) {
      if (!(this_present_trace_id_high && that_present_trace_id_high))
        return false;
      if (this.trace_id_high != that.trace_id_high)
        return false;
    }

    return true;
  }