/** * 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 (getDuration() != null) sb.append("Duration: ").append(getDuration()).append(","); if (getRequestCount() != null) sb.append("RequestCount: ").append(getRequestCount()).append(","); if (getStatusCodes() != null) sb.append("StatusCodes: ").append(getStatusCodes()).append(","); if (getLatency() != null) sb.append("Latency: ").append(getLatency()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDuration() == null) ? 0 : getDuration().hashCode()); hashCode = prime * hashCode + ((getRequestCount() == null) ? 0 : getRequestCount().hashCode()); hashCode = prime * hashCode + ((getStatusCodes() == null) ? 0 : getStatusCodes().hashCode()); hashCode = prime * hashCode + ((getLatency() == null) ? 0 : getLatency().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ApplicationMetrics == false) return false; ApplicationMetrics other = (ApplicationMetrics) obj; if (other.getDuration() == null ^ this.getDuration() == null) return false; if (other.getDuration() != null && other.getDuration().equals(this.getDuration()) == false) return false; if (other.getRequestCount() == null ^ this.getRequestCount() == null) return false; if (other.getRequestCount() != null && other.getRequestCount().equals(this.getRequestCount()) == false) return false; if (other.getStatusCodes() == null ^ this.getStatusCodes() == null) return false; if (other.getStatusCodes() != null && other.getStatusCodes().equals(this.getStatusCodes()) == false) return false; if (other.getLatency() == null ^ this.getLatency() == null) return false; if (other.getLatency() != null && other.getLatency().equals(this.getLatency()) == 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 (getDuration() != null) sb.append("Duration: ").append(getDuration()).append(","); if (getRequestCount() != null) sb.append("RequestCount: ").append(getRequestCount()).append(","); if (getStatusCodes() != null) sb.append("StatusCodes: ").append(getStatusCodes()).append(","); if (getLatency() != null) sb.append("Latency: ").append(getLatency()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDuration() == null) ? 0 : getDuration().hashCode()); hashCode = prime * hashCode + ((getRequestCount() == null) ? 0 : getRequestCount().hashCode()); hashCode = prime * hashCode + ((getStatusCodes() == null) ? 0 : getStatusCodes().hashCode()); hashCode = prime * hashCode + ((getLatency() == null) ? 0 : getLatency().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ApplicationMetrics == false) return false; ApplicationMetrics other = (ApplicationMetrics) obj; if (other.getDuration() == null ^ this.getDuration() == null) return false; if (other.getDuration() != null && other.getDuration().equals(this.getDuration()) == false) return false; if (other.getRequestCount() == null ^ this.getRequestCount() == null) return false; if (other.getRequestCount() != null && other.getRequestCount().equals(this.getRequestCount()) == false) return false; if (other.getStatusCodes() == null ^ this.getStatusCodes() == null) return false; if (other.getStatusCodes() != null && other.getStatusCodes().equals(this.getStatusCodes()) == false) return false; if (other.getLatency() == null ^ this.getLatency() == null) return false; if (other.getLatency() != null && other.getLatency().equals(this.getLatency()) == false) return false; return true; }