/** * 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 (getHostedZone() != null) sb.append("HostedZone: ").append(getHostedZone()).append(","); if (getChangeInfo() != null) sb.append("ChangeInfo: ").append(getChangeInfo()).append(","); if (getDelegationSet() != null) sb.append("DelegationSet: ").append(getDelegationSet()).append(","); if (getVPC() != null) sb.append("VPC: ").append(getVPC()).append(","); if (getLocation() != null) sb.append("Location: ").append(getLocation()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHostedZone() == null) ? 0 : getHostedZone().hashCode()); hashCode = prime * hashCode + ((getChangeInfo() == null) ? 0 : getChangeInfo().hashCode()); hashCode = prime * hashCode + ((getDelegationSet() == null) ? 0 : getDelegationSet().hashCode()); hashCode = prime * hashCode + ((getVPC() == null) ? 0 : getVPC().hashCode()); hashCode = prime * hashCode + ((getLocation() == null) ? 0 : getLocation().hashCode()); return hashCode; }
if (other.getVPC() != null && other.getVPC().equals(this.getVPC()) == false) return false; if (other.getLocation() == null ^ this.getLocation() == null) return false; if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == false) return false; return true;