@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProcessName() == null) ? 0 : getProcessName().hashCode()); hashCode = prime * hashCode + ((getSuspensionReason() == null) ? 0 : getSuspensionReason().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SuspendedProcess == false) return false; SuspendedProcess other = (SuspendedProcess) obj; if (other.getProcessName() == null ^ this.getProcessName() == null) return false; if (other.getProcessName() != null && other.getProcessName().equals(this.getProcessName()) == false) return false; if (other.getSuspensionReason() == null ^ this.getSuspensionReason() == null) return false; if (other.getSuspensionReason() != null && other.getSuspensionReason().equals(this.getSuspensionReason()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getProcessName() != null) sb.append("ProcessName: ").append(getProcessName()).append(","); if (getSuspensionReason() != null) sb.append("SuspensionReason: ").append(getSuspensionReason()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProcessName() == null) ? 0 : getProcessName().hashCode()); hashCode = prime * hashCode + ((getSuspensionReason() == null) ? 0 : getSuspensionReason().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getProcessName() != null) sb.append("ProcessName: " + getProcessName() + ","); if (getSuspensionReason() != null) sb.append("SuspensionReason: " + getSuspensionReason()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SuspendedProcess == false) return false; SuspendedProcess other = (SuspendedProcess) obj; if (other.getProcessName() == null ^ this.getProcessName() == null) return false; if (other.getProcessName() != null && other.getProcessName().equals(this.getProcessName()) == false) return false; if (other.getSuspensionReason() == null ^ this.getSuspensionReason() == null) return false; if (other.getSuspensionReason() != null && other.getSuspensionReason().equals(this.getSuspensionReason()) == false) return false; return true; } }
public void marshall(SuspendedProcess _suspendedProcess, Request<?> request, String _prefix) { String prefix; if (_suspendedProcess.getProcessName() != null) { prefix = _prefix + "ProcessName"; String processName = _suspendedProcess.getProcessName(); request.addParameter(prefix, StringUtils.fromString(processName)); } if (_suspendedProcess.getSuspensionReason() != null) { prefix = _prefix + "SuspensionReason"; String suspensionReason = _suspendedProcess.getSuspensionReason(); request.addParameter(prefix, StringUtils.fromString(suspensionReason)); } }