Пример #1
0
  @Override
  public int compareTo(SettableBlobMeta other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(is_set_acl()).compareTo(other.is_set_acl());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_acl()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acl, other.acl);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(is_set_replication_factor()).compareTo(other.is_set_replication_factor());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_replication_factor()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.replication_factor, other.replication_factor);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Пример #2
0
 /** Performs a deep copy on <i>other</i>. */
 public SettableBlobMeta(SettableBlobMeta other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.is_set_acl()) {
     List<AccessControl> __this__acl = new ArrayList<AccessControl>(other.acl.size());
     for (AccessControl other_element : other.acl) {
       __this__acl.add(new AccessControl(other_element));
     }
     this.acl = __this__acl;
   }
   this.replication_factor = other.replication_factor;
 }
Пример #3
0
  public boolean equals(SettableBlobMeta that) {
    if (that == null) return false;

    boolean this_present_acl = true && this.is_set_acl();
    boolean that_present_acl = true && that.is_set_acl();
    if (this_present_acl || that_present_acl) {
      if (!(this_present_acl && that_present_acl)) return false;
      if (!this.acl.equals(that.acl)) return false;
    }

    boolean this_present_replication_factor = true && this.is_set_replication_factor();
    boolean that_present_replication_factor = true && that.is_set_replication_factor();
    if (this_present_replication_factor || that_present_replication_factor) {
      if (!(this_present_replication_factor && that_present_replication_factor)) return false;
      if (this.replication_factor != that.replication_factor) return false;
    }

    return true;
  }