* An object that describes the solution. *
*/ private Solution solution; /** ** An object that describes the solution. *
* * @param solution * An object that describes the solution. */ public void setSolution(Solution solution) { this.solution = solution; } /** ** An object that describes the solution. *
* * @return An object that describes the solution. */ public Solution getSolution() { return this.solution; } /** ** An object that describes the solution. *
* * @param solution * An object that describes the solution. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSolutionResult withSolution(Solution solution) { setSolution(solution); return this; } /** * 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 (getSolution() != null) sb.append("Solution: ").append(getSolution()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeSolutionResult == false) return false; DescribeSolutionResult other = (DescribeSolutionResult) obj; if (other.getSolution() == null ^ this.getSolution() == null) return false; if (other.getSolution() != null && other.getSolution().equals(this.getSolution()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSolution() == null) ? 0 : getSolution().hashCode()); return hashCode; } @Override public DescribeSolutionResult clone() { try { return (DescribeSolutionResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }