/** * 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 (getUrls() != null) sb.append("Urls: ").append(getUrls()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getFace() != null) sb.append("Face: ").append(getFace()).append(","); if (getMatchConfidence() != null) sb.append("MatchConfidence: ").append(getMatchConfidence()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUrls() == null) ? 0 : getUrls().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode()); hashCode = prime * hashCode + ((getMatchConfidence() == null) ? 0 : getMatchConfidence().hashCode()); return hashCode; }
/** * Marshall the given parameter object. */ public void marshall(Celebrity celebrity, ProtocolMarshaller protocolMarshaller) { if (celebrity == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(celebrity.getUrls(), URLS_BINDING); protocolMarshaller.marshall(celebrity.getName(), NAME_BINDING); protocolMarshaller.marshall(celebrity.getId(), ID_BINDING); protocolMarshaller.marshall(celebrity.getFace(), FACE_BINDING); protocolMarshaller.marshall(celebrity.getMatchConfidence(), MATCHCONFIDENCE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; if (other.getMatchConfidence() == null ^ this.getMatchConfidence() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUrls() == null) ? 0 : getUrls().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode()); hashCode = prime * hashCode + ((getMatchConfidence() == null) ? 0 : getMatchConfidence().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 (getUrls() != null) sb.append("Urls: " + getUrls() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getId() != null) sb.append("Id: " + getId() + ","); if (getFace() != null) sb.append("Face: " + getFace() + ","); if (getMatchConfidence() != null) sb.append("MatchConfidence: " + getMatchConfidence()); sb.append("}"); return sb.toString(); }
if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; if (other.getMatchConfidence() == null ^ this.getMatchConfidence() == null)