예제 #1
0
  public int compareTo(LocationProperty other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetProperty()).compareTo(typedOther.isSetProperty());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProperty()) {
      lastComparison = TBaseHelper.compareTo(this.property, typedOther.property);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
예제 #2
0
  public boolean equals(LocationProperty that) {
    if (that == null) return false;

    boolean this_present_property = true && this.isSetProperty();
    boolean that_present_property = true && that.isSetProperty();
    if (this_present_property || that_present_property) {
      if (!(this_present_property && that_present_property)) return false;
      if (!this.property.equals(that.property)) return false;
    }

    return true;
  }
예제 #3
0
 /** Performs a deep copy on <i>other</i>. */
 public LocationProperty(LocationProperty other) {
   if (other.isSetProperty()) {
     this.property = new LocationPropertyValue(other.property);
   }
 }