@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSimilarity() == null) ? 0 : getSimilarity().hashCode()); hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode()); return hashCode; }
/** * 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 (getSimilarity() != null) sb.append("Similarity: ").append(getSimilarity()).append(","); if (getFace() != null) sb.append("Face: ").append(getFace()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CompareFacesMatch == false) return false; CompareFacesMatch other = (CompareFacesMatch) obj; if (other.getSimilarity() == null ^ this.getSimilarity() == null) return false; if (other.getSimilarity() != null && other.getSimilarity().equals(this.getSimilarity()) == false) return false; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(CompareFacesMatch compareFacesMatch, ProtocolMarshaller protocolMarshaller) { if (compareFacesMatch == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(compareFacesMatch.getSimilarity(), SIMILARITY_BINDING); protocolMarshaller.marshall(compareFacesMatch.getFace(), FACE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSimilarity() == null) ? 0 : getSimilarity().hashCode()); hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().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 (getSimilarity() != null) sb.append("Similarity: " + getSimilarity() + ","); if (getFace() != null) sb.append("Face: " + getFace()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CompareFacesMatch == false) return false; CompareFacesMatch other = (CompareFacesMatch) obj; if (other.getSimilarity() == null ^ this.getSimilarity() == null) return false; if (other.getSimilarity() != null && other.getSimilarity().equals(this.getSimilarity()) == false) return false; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; return true; } }
public void marshall(CompareFacesMatch compareFacesMatch, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (compareFacesMatch.getSimilarity() != null) { Float similarity = compareFacesMatch.getSimilarity(); jsonWriter.name("Similarity"); jsonWriter.value(similarity); } if (compareFacesMatch.getFace() != null) { ComparedFace face = compareFacesMatch.getFace(); jsonWriter.name("Face"); ComparedFaceJsonMarshaller.getInstance().marshall(face, jsonWriter); } jsonWriter.endObject(); }