public boolean equals(final HostConnection other) { return this == other || (connId == other.connId && (hostAddr == other.hostAddr || hostAddr.equals(other.hostAddr)) && (token == other.token || (token != null && token .equals(other.token)))); }
@Override public int compareTo(HostAddress other) { if (!equals(other)) { return super.compareTo(other); } else { return 0; } }
/** * {@inheritDoc} */ @Override public BatchFinalize merge(BatchFinalize o) { if (o instanceof ClientFinalizer) { ClientFinalizer other = (ClientFinalizer)o; final HostConnection hostConn = other.source; final HostConnection thisConn = this.source; // to maximise batch, group by target HostAddress i.e. for each distinct // GFXDServiceImpl, which means a connection/ClientService may send // bulkClose request for a different connection/ClientService on the same // server which is by design if (hostConn != null && thisConn != null && hostConn.hostAddr.equals(thisConn.hostAddr)) { if (this.batchedFinalizers == null) { this.batchedFinalizers = new TLinkedList(); } this.batchedFinalizers.add(other); return this; } } return null; } }
public boolean equals(getPreferredServer_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_error = true && this.isSetError(); boolean that_present_error = true && that.isSetError(); if (this_present_error || that_present_error) { if (!(this_present_error && that_present_error)) return false; if (!this.error.equals(that.error)) return false; } return true; }
if (!(this_present_source && that_present_source)) return false; if (!this.source.equals(that.source)) return false;