Exemplo n.º 1
0
  public boolean equals(ClusterSummary that) {
    if (that == null) return false;

    boolean this_present_supervisors = true && this.is_set_supervisors();
    boolean that_present_supervisors = true && that.is_set_supervisors();
    if (this_present_supervisors || that_present_supervisors) {
      if (!(this_present_supervisors && that_present_supervisors)) return false;
      if (!this.supervisors.equals(that.supervisors)) return false;
    }

    boolean this_present_nimbus_uptime_secs = true;
    boolean that_present_nimbus_uptime_secs = true;
    if (this_present_nimbus_uptime_secs || that_present_nimbus_uptime_secs) {
      if (!(this_present_nimbus_uptime_secs && that_present_nimbus_uptime_secs)) return false;
      if (this.nimbus_uptime_secs != that.nimbus_uptime_secs) return false;
    }

    boolean this_present_topologies = true && this.is_set_topologies();
    boolean that_present_topologies = true && that.is_set_topologies();
    if (this_present_topologies || that_present_topologies) {
      if (!(this_present_topologies && that_present_topologies)) return false;
      if (!this.topologies.equals(that.topologies)) return false;
    }

    boolean this_present_version = true && this.is_set_version();
    boolean that_present_version = true && that.is_set_version();
    if (this_present_version || that_present_version) {
      if (!(this_present_version && that_present_version)) return false;
      if (!this.version.equals(that.version)) return false;
    }

    return true;
  }
Exemplo n.º 2
0
  public int compareTo(ClusterSummary other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison =
        Boolean.valueOf(is_set_supervisors()).compareTo(typedOther.is_set_supervisors());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_supervisors()) {
      lastComparison =
          org.apache.thrift7.TBaseHelper.compareTo(this.supervisors, typedOther.supervisors);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(is_set_nimbus_uptime_secs())
            .compareTo(typedOther.is_set_nimbus_uptime_secs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_nimbus_uptime_secs()) {
      lastComparison =
          org.apache.thrift7.TBaseHelper.compareTo(
              this.nimbus_uptime_secs, typedOther.nimbus_uptime_secs);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_topologies()).compareTo(typedOther.is_set_topologies());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_topologies()) {
      lastComparison =
          org.apache.thrift7.TBaseHelper.compareTo(this.topologies, typedOther.topologies);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_version()).compareTo(typedOther.is_set_version());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_version()) {
      lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.version, typedOther.version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Exemplo n.º 3
0
 /** Performs a deep copy on <i>other</i>. */
 public ClusterSummary(ClusterSummary other) {
   __isset_bit_vector.clear();
   __isset_bit_vector.or(other.__isset_bit_vector);
   if (other.is_set_supervisors()) {
     List<SupervisorSummary> __this__supervisors = new ArrayList<SupervisorSummary>();
     for (SupervisorSummary other_element : other.supervisors) {
       __this__supervisors.add(new SupervisorSummary(other_element));
     }
     this.supervisors = __this__supervisors;
   }
   this.nimbus_uptime_secs = other.nimbus_uptime_secs;
   if (other.is_set_topologies()) {
     List<TopologySummary> __this__topologies = new ArrayList<TopologySummary>();
     for (TopologySummary other_element : other.topologies) {
       __this__topologies.add(new TopologySummary(other_element));
     }
     this.topologies = __this__topologies;
   }
   if (other.is_set_version()) {
     this.version = other.version;
   }
 }