/** Performs a deep copy on <i>other</i>. */ public ResourceJobManager(ResourceJobManager other) { if (other.isSetResourceJobManagerId()) { this.resourceJobManagerId = other.resourceJobManagerId; } if (other.isSetResourceJobManagerType()) { this.resourceJobManagerType = other.resourceJobManagerType; } if (other.isSetPushMonitoringEndpoint()) { this.pushMonitoringEndpoint = other.pushMonitoringEndpoint; } if (other.isSetJobManagerBinPath()) { this.jobManagerBinPath = other.jobManagerBinPath; } if (other.isSetJobManagerCommands()) { Map<JobManagerCommand, String> __this__jobManagerCommands = new HashMap<JobManagerCommand, String>(other.jobManagerCommands.size()); for (Map.Entry<JobManagerCommand, String> other_element : other.jobManagerCommands.entrySet()) { JobManagerCommand other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); JobManagerCommand __this__jobManagerCommands_copy_key = other_element_key; String __this__jobManagerCommands_copy_value = other_element_value; __this__jobManagerCommands.put( __this__jobManagerCommands_copy_key, __this__jobManagerCommands_copy_value); } this.jobManagerCommands = __this__jobManagerCommands; } }
public boolean equals(ResourceJobManager that) { if (that == null) return false; boolean this_present_resourceJobManagerId = true && this.isSetResourceJobManagerId(); boolean that_present_resourceJobManagerId = true && that.isSetResourceJobManagerId(); if (this_present_resourceJobManagerId || that_present_resourceJobManagerId) { if (!(this_present_resourceJobManagerId && that_present_resourceJobManagerId)) return false; if (!this.resourceJobManagerId.equals(that.resourceJobManagerId)) return false; } boolean this_present_resourceJobManagerType = true && this.isSetResourceJobManagerType(); boolean that_present_resourceJobManagerType = true && that.isSetResourceJobManagerType(); if (this_present_resourceJobManagerType || that_present_resourceJobManagerType) { if (!(this_present_resourceJobManagerType && that_present_resourceJobManagerType)) return false; if (!this.resourceJobManagerType.equals(that.resourceJobManagerType)) return false; } boolean this_present_pushMonitoringEndpoint = true && this.isSetPushMonitoringEndpoint(); boolean that_present_pushMonitoringEndpoint = true && that.isSetPushMonitoringEndpoint(); if (this_present_pushMonitoringEndpoint || that_present_pushMonitoringEndpoint) { if (!(this_present_pushMonitoringEndpoint && that_present_pushMonitoringEndpoint)) return false; if (!this.pushMonitoringEndpoint.equals(that.pushMonitoringEndpoint)) return false; } boolean this_present_jobManagerBinPath = true && this.isSetJobManagerBinPath(); boolean that_present_jobManagerBinPath = true && that.isSetJobManagerBinPath(); if (this_present_jobManagerBinPath || that_present_jobManagerBinPath) { if (!(this_present_jobManagerBinPath && that_present_jobManagerBinPath)) return false; if (!this.jobManagerBinPath.equals(that.jobManagerBinPath)) return false; } boolean this_present_jobManagerCommands = true && this.isSetJobManagerCommands(); boolean that_present_jobManagerCommands = true && that.isSetJobManagerCommands(); if (this_present_jobManagerCommands || that_present_jobManagerCommands) { if (!(this_present_jobManagerCommands && that_present_jobManagerCommands)) return false; if (!this.jobManagerCommands.equals(that.jobManagerCommands)) return false; } return true; }
@Override public int compareTo(ResourceJobManager other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetResourceJobManagerId()).compareTo(other.isSetResourceJobManagerId()); if (lastComparison != 0) { return lastComparison; } if (isSetResourceJobManagerId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.resourceJobManagerId, other.resourceJobManagerId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetResourceJobManagerType()) .compareTo(other.isSetResourceJobManagerType()); if (lastComparison != 0) { return lastComparison; } if (isSetResourceJobManagerType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.resourceJobManagerType, other.resourceJobManagerType); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPushMonitoringEndpoint()) .compareTo(other.isSetPushMonitoringEndpoint()); if (lastComparison != 0) { return lastComparison; } if (isSetPushMonitoringEndpoint()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.pushMonitoringEndpoint, other.pushMonitoringEndpoint); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetJobManagerBinPath()).compareTo(other.isSetJobManagerBinPath()); if (lastComparison != 0) { return lastComparison; } if (isSetJobManagerBinPath()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobManagerBinPath, other.jobManagerBinPath); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetJobManagerCommands()).compareTo(other.isSetJobManagerCommands()); if (lastComparison != 0) { return lastComparison; } if (isSetJobManagerCommands()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.jobManagerCommands, other.jobManagerCommands); if (lastComparison != 0) { return lastComparison; } } return 0; }