Example #1
0
  public boolean equals(IntString that) {
    if (that == null) return false;

    boolean this_present_myint = true;
    boolean that_present_myint = true;
    if (this_present_myint || that_present_myint) {
      if (!(this_present_myint && that_present_myint)) return false;
      if (this.myint != that.myint) return false;
    }

    boolean this_present_myString = true && this.isSetMyString();
    boolean that_present_myString = true && that.isSetMyString();
    if (this_present_myString || that_present_myString) {
      if (!(this_present_myString && that_present_myString)) return false;
      if (!this.myString.equals(that.myString)) return false;
    }

    boolean this_present_underscore_int = true;
    boolean that_present_underscore_int = true;
    if (this_present_underscore_int || that_present_underscore_int) {
      if (!(this_present_underscore_int && that_present_underscore_int)) return false;
      if (this.underscore_int != that.underscore_int) return false;
    }

    return true;
  }
Example #2
0
 /** Performs a deep copy on <i>other</i>. */
 public IntString(IntString other) {
   __isset_bit_vector.clear();
   __isset_bit_vector.or(other.__isset_bit_vector);
   this.myint = other.myint;
   if (other.isSetMyString()) {
     this.myString = other.myString;
   }
   this.underscore_int = other.underscore_int;
 }
Example #3
0
  public int compareTo(IntString other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetMyint()).compareTo(typedOther.isSetMyint());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMyint()) {
      lastComparison = TBaseHelper.compareTo(this.myint, typedOther.myint);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMyString()).compareTo(typedOther.isSetMyString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMyString()) {
      lastComparison = TBaseHelper.compareTo(this.myString, typedOther.myString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetUnderscore_int()).compareTo(typedOther.isSetUnderscore_int());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnderscore_int()) {
      lastComparison = TBaseHelper.compareTo(this.underscore_int, typedOther.underscore_int);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }