public boolean equals(WorkerSummary that) { if (that == null) return false; boolean this_present_port = true; boolean that_present_port = true; if (this_present_port || that_present_port) { if (!(this_present_port && that_present_port)) return false; if (this.port != that.port) return false; } boolean this_present_uptime = true; boolean that_present_uptime = true; if (this_present_uptime || that_present_uptime) { if (!(this_present_uptime && that_present_uptime)) return false; if (this.uptime != that.uptime) return false; } boolean this_present_topology = true && this.is_set_topology(); boolean that_present_topology = true && that.is_set_topology(); if (this_present_topology || that_present_topology) { if (!(this_present_topology && that_present_topology)) return false; if (!this.topology.equals(that.topology)) return false; } boolean this_present_tasks = true && this.is_set_tasks(); boolean that_present_tasks = true && that.is_set_tasks(); if (this_present_tasks || that_present_tasks) { if (!(this_present_tasks && that_present_tasks)) return false; if (!this.tasks.equals(that.tasks)) return false; } return true; }
@Override public int compareTo(WorkerSummary other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port()); if (lastComparison != 0) { return lastComparison; } if (is_set_port()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_uptime()).compareTo(other.is_set_uptime()); if (lastComparison != 0) { return lastComparison; } if (is_set_uptime()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime, other.uptime); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_topology()).compareTo(other.is_set_topology()); if (lastComparison != 0) { return lastComparison; } if (is_set_topology()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.topology, other.topology); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_tasks()).compareTo(other.is_set_tasks()); if (lastComparison != 0) { return lastComparison; } if (is_set_tasks()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tasks, other.tasks); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** Performs a deep copy on <i>other</i>. */ public WorkerSummary(WorkerSummary other) { __isset_bitfield = other.__isset_bitfield; this.port = other.port; this.uptime = other.uptime; if (other.is_set_topology()) { this.topology = other.topology; } if (other.is_set_tasks()) { List<TaskComponent> __this__tasks = new ArrayList<TaskComponent>(other.tasks.size()); for (TaskComponent other_element : other.tasks) { __this__tasks.add(new TaskComponent(other_element)); } this.tasks = __this__tasks; } }
/** Performs a deep copy on <i>other</i>. */ public WorkerSummary(WorkerSummary other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.port = other.port; if (other.is_set_topology()) { this.topology = other.topology; } if (other.is_set_tasks()) { List<TaskSummary> __this__tasks = new ArrayList<TaskSummary>(); for (TaskSummary other_element : other.tasks) { __this__tasks.add(new TaskSummary(other_element)); } this.tasks = __this__tasks; } }