示例#1
0
  public int compareTo(Bolt other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    Bolt typedOther = (Bolt) other;

    lastComparison =
        Boolean.valueOf(is_set_bolt_object()).compareTo(typedOther.is_set_bolt_object());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_bolt_object()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.bolt_object, typedOther.bolt_object);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_common()).compareTo(typedOther.is_set_common());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_common()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.common, typedOther.common);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
示例#2
0
 /** Performs a deep copy on <i>other</i>. */
 public Bolt(Bolt other) {
   if (other.is_set_bolt_object()) {
     this.bolt_object = new ComponentObject(other.bolt_object);
   }
   if (other.is_set_common()) {
     this.common = new ComponentCommon(other.common);
   }
 }
示例#3
0
  public boolean equals(Bolt that) {
    if (that == null) return false;

    boolean this_present_bolt_object = true && this.is_set_bolt_object();
    boolean that_present_bolt_object = true && that.is_set_bolt_object();
    if (this_present_bolt_object || that_present_bolt_object) {
      if (!(this_present_bolt_object && that_present_bolt_object)) return false;
      if (!this.bolt_object.equals(that.bolt_object)) return false;
    }

    boolean this_present_common = true && this.is_set_common();
    boolean that_present_common = true && that.is_set_common();
    if (this_present_common || that_present_common) {
      if (!(this_present_common && that_present_common)) return false;
      if (!this.common.equals(that.common)) return false;
    }

    return true;
  }