/** * 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 (getFaceId() != null) sb.append("FaceId: " + getFaceId() + ","); if (getBoundingBox() != null) sb.append("BoundingBox: " + getBoundingBox() + ","); if (getImageId() != null) sb.append("ImageId: " + getImageId() + ","); if (getExternalImageId() != null) sb.append("ExternalImageId: " + getExternalImageId() + ","); if (getConfidence() != null) sb.append("Confidence: " + getConfidence() + ","); if (getAssociationScore() != null) sb.append("AssociationScore: " + getAssociationScore()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaceId() == null) ? 0 : getFaceId().hashCode()); hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); hashCode = prime * hashCode + ((getExternalImageId() == null) ? 0 : getExternalImageId().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getAssociationScore() == null) ? 0 : getAssociationScore().hashCode()); return hashCode; }
&& other.getConfidence().equals(this.getConfidence()) == false) return false; if (other.getAssociationScore() == null ^ this.getAssociationScore() == null) return false; if (other.getAssociationScore() != null && other.getAssociationScore().equals(this.getAssociationScore()) == false) return false; return true;
jsonWriter.value(confidence); if (face.getAssociationScore() != null) { Float associationScore = face.getAssociationScore(); jsonWriter.name("AssociationScore"); jsonWriter.value(associationScore);