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

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetPredicateName()).compareTo(other.isSetPredicateName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPredicateName()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.predicateName, other.predicateName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetValues()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
 /** Performs a deep copy on <i>other</i>. */
 public UnaryPredicate(UnaryPredicate other) {
   if (other.isSetPredicateName()) {
     this.predicateName = other.predicateName;
   }
   if (other.isSetValues()) {
     List<PredicateValue> __this__values = new ArrayList<PredicateValue>(other.values.size());
     for (PredicateValue other_element : other.values) {
       __this__values.add(new PredicateValue(other_element));
     }
     this.values = __this__values;
   }
 }
  public boolean equals(UnaryPredicate that) {
    if (that == null) return false;

    boolean this_present_predicateName = true && this.isSetPredicateName();
    boolean that_present_predicateName = true && that.isSetPredicateName();
    if (this_present_predicateName || that_present_predicateName) {
      if (!(this_present_predicateName && that_present_predicateName)) return false;
      if (!this.predicateName.equals(that.predicateName)) return false;
    }

    boolean this_present_values = true && this.isSetValues();
    boolean that_present_values = true && that.isSetValues();
    if (this_present_values || that_present_values) {
      if (!(this_present_values && that_present_values)) return false;
      if (!this.values.equals(that.values)) return false;
    }

    return true;
  }