/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.rekognition.model; import java.io.Serializable; /** *

* Structure containing attributes of the face that the algorithm detected. *

*

* A FaceDetail object contains either the default facial * attributes or all facial attributes. The default attributes are * BoundingBox, Confidence, Landmarks, * Pose, and Quality. *

*

* GetFaceDetection is the only Amazon Rekognition Video stored video * operation that can return a FaceDetail object with all * attributes. To specify which attributes to return, use the * FaceAttributes input parameter for StartFaceDetection. * The following Amazon Rekognition Video operations return only the default * attributes. The corresponding Start operations don't have a * FaceAttributes input parameter: *

* *

* The Amazon Rekognition Image DetectFaces and IndexFaces * operations can return all facial attributes. To specify which attributes to * return, use the Attributes input parameter for * DetectFaces. For IndexFaces, use the * DetectAttributes input parameter. *

*/ public class FaceDetail implements Serializable { /** *

* Bounding box of the face. Default attribute. *

*/ private BoundingBox boundingBox; /** *

* The estimated age range, in years, for the face. Low represents the * lowest estimated age and High represents the highest estimated age. *

*/ private AgeRange ageRange; /** *

* Indicates whether or not the face is smiling, and the confidence level in * the determination. *

*/ private Smile smile; /** *

* Indicates whether or not the face is wearing eye glasses, and the * confidence level in the determination. *

*/ private Eyeglasses eyeglasses; /** *

* Indicates whether or not the face is wearing sunglasses, and the * confidence level in the determination. *

*/ private Sunglasses sunglasses; /** *

* The predicted gender of a detected face. *

*/ private Gender gender; /** *

* Indicates whether or not the face has a beard, and the confidence level * in the determination. *

*/ private Beard beard; /** *

* Indicates whether or not the face has a mustache, and the confidence * level in the determination. *

*/ private Mustache mustache; /** *

* Indicates whether or not the eyes on the face are open, and the * confidence level in the determination. *

*/ private EyeOpen eyesOpen; /** *

* Indicates whether or not the mouth on the face is open, and the * confidence level in the determination. *

*/ private MouthOpen mouthOpen; /** *

* The emotions that appear to be expressed on the face, and the confidence * level in the determination. The API is only making a determination of the * physical appearance of a person's face. It is not a determination of the * person’s internal emotional state and should not be used in such a way. * For example, a person pretending to have a sad face might not be sad * emotionally. *

*/ private java.util.List emotions; /** *

* Indicates the location of landmarks on the face. Default attribute. *

*/ private java.util.List landmarks; /** *

* Indicates the pose of the face as determined by its pitch, roll, and yaw. * Default attribute. *

*/ private Pose pose; /** *

* Identifies image brightness and sharpness. Default attribute. *

*/ private ImageQuality quality; /** *

* Confidence level that the bounding box contains a face (and not a * different object such as a tree). Default attribute. *

*

* Constraints:
* Length: 0.0 - 100.0
*/ private Float confidence; /** *

* FaceOccluded should return "true" with a high confidence * score if a detected face’s eyes, nose, and mouth are partially captured * or if they are covered by masks, dark sunglasses, cell phones, hands, or * other objects. FaceOccluded should return "false" with a * high confidence score if common occurrences that do not impact face * verification are detected, such as eye glasses, lightly tinted * sunglasses, strands of hair, and others. *

*/ private FaceOccluded faceOccluded; /** *

* Indicates the direction the eyes are gazing in, as defined by pitch and * yaw. *

*/ private EyeDirection eyeDirection; /** *

* Bounding box of the face. Default attribute. *

* * @return

* Bounding box of the face. Default attribute. *

*/ public BoundingBox getBoundingBox() { return boundingBox; } /** *

* Bounding box of the face. Default attribute. *

* * @param boundingBox

* Bounding box of the face. Default attribute. *

*/ public void setBoundingBox(BoundingBox boundingBox) { this.boundingBox = boundingBox; } /** *

* Bounding box of the face. Default attribute. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param boundingBox

* Bounding box of the face. Default attribute. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withBoundingBox(BoundingBox boundingBox) { this.boundingBox = boundingBox; return this; } /** *

* The estimated age range, in years, for the face. Low represents the * lowest estimated age and High represents the highest estimated age. *

* * @return

* The estimated age range, in years, for the face. Low represents * the lowest estimated age and High represents the highest * estimated age. *

*/ public AgeRange getAgeRange() { return ageRange; } /** *

* The estimated age range, in years, for the face. Low represents the * lowest estimated age and High represents the highest estimated age. *

* * @param ageRange

* The estimated age range, in years, for the face. Low * represents the lowest estimated age and High represents the * highest estimated age. *

*/ public void setAgeRange(AgeRange ageRange) { this.ageRange = ageRange; } /** *

* The estimated age range, in years, for the face. Low represents the * lowest estimated age and High represents the highest estimated age. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param ageRange

* The estimated age range, in years, for the face. Low * represents the lowest estimated age and High represents the * highest estimated age. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withAgeRange(AgeRange ageRange) { this.ageRange = ageRange; return this; } /** *

* Indicates whether or not the face is smiling, and the confidence level in * the determination. *

* * @return

* Indicates whether or not the face is smiling, and the confidence * level in the determination. *

*/ public Smile getSmile() { return smile; } /** *

* Indicates whether or not the face is smiling, and the confidence level in * the determination. *

* * @param smile

* Indicates whether or not the face is smiling, and the * confidence level in the determination. *

*/ public void setSmile(Smile smile) { this.smile = smile; } /** *

* Indicates whether or not the face is smiling, and the confidence level in * the determination. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param smile

* Indicates whether or not the face is smiling, and the * confidence level in the determination. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withSmile(Smile smile) { this.smile = smile; return this; } /** *

* Indicates whether or not the face is wearing eye glasses, and the * confidence level in the determination. *

* * @return

* Indicates whether or not the face is wearing eye glasses, and the * confidence level in the determination. *

*/ public Eyeglasses getEyeglasses() { return eyeglasses; } /** *

* Indicates whether or not the face is wearing eye glasses, and the * confidence level in the determination. *

* * @param eyeglasses

* Indicates whether or not the face is wearing eye glasses, and * the confidence level in the determination. *

*/ public void setEyeglasses(Eyeglasses eyeglasses) { this.eyeglasses = eyeglasses; } /** *

* Indicates whether or not the face is wearing eye glasses, and the * confidence level in the determination. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param eyeglasses

* Indicates whether or not the face is wearing eye glasses, and * the confidence level in the determination. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withEyeglasses(Eyeglasses eyeglasses) { this.eyeglasses = eyeglasses; return this; } /** *

* Indicates whether or not the face is wearing sunglasses, and the * confidence level in the determination. *

* * @return

* Indicates whether or not the face is wearing sunglasses, and the * confidence level in the determination. *

*/ public Sunglasses getSunglasses() { return sunglasses; } /** *

* Indicates whether or not the face is wearing sunglasses, and the * confidence level in the determination. *

* * @param sunglasses

* Indicates whether or not the face is wearing sunglasses, and * the confidence level in the determination. *

*/ public void setSunglasses(Sunglasses sunglasses) { this.sunglasses = sunglasses; } /** *

* Indicates whether or not the face is wearing sunglasses, and the * confidence level in the determination. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param sunglasses

* Indicates whether or not the face is wearing sunglasses, and * the confidence level in the determination. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withSunglasses(Sunglasses sunglasses) { this.sunglasses = sunglasses; return this; } /** *

* The predicted gender of a detected face. *

* * @return

* The predicted gender of a detected face. *

*/ public Gender getGender() { return gender; } /** *

* The predicted gender of a detected face. *

* * @param gender

* The predicted gender of a detected face. *

*/ public void setGender(Gender gender) { this.gender = gender; } /** *

* The predicted gender of a detected face. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param gender

* The predicted gender of a detected face. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withGender(Gender gender) { this.gender = gender; return this; } /** *

* Indicates whether or not the face has a beard, and the confidence level * in the determination. *

* * @return

* Indicates whether or not the face has a beard, and the confidence * level in the determination. *

*/ public Beard getBeard() { return beard; } /** *

* Indicates whether or not the face has a beard, and the confidence level * in the determination. *

* * @param beard

* Indicates whether or not the face has a beard, and the * confidence level in the determination. *

*/ public void setBeard(Beard beard) { this.beard = beard; } /** *

* Indicates whether or not the face has a beard, and the confidence level * in the determination. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param beard

* Indicates whether or not the face has a beard, and the * confidence level in the determination. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withBeard(Beard beard) { this.beard = beard; return this; } /** *

* Indicates whether or not the face has a mustache, and the confidence * level in the determination. *

* * @return

* Indicates whether or not the face has a mustache, and the * confidence level in the determination. *

*/ public Mustache getMustache() { return mustache; } /** *

* Indicates whether or not the face has a mustache, and the confidence * level in the determination. *

* * @param mustache

* Indicates whether or not the face has a mustache, and the * confidence level in the determination. *

*/ public void setMustache(Mustache mustache) { this.mustache = mustache; } /** *

* Indicates whether or not the face has a mustache, and the confidence * level in the determination. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param mustache

* Indicates whether or not the face has a mustache, and the * confidence level in the determination. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withMustache(Mustache mustache) { this.mustache = mustache; return this; } /** *

* Indicates whether or not the eyes on the face are open, and the * confidence level in the determination. *

* * @return

* Indicates whether or not the eyes on the face are open, and the * confidence level in the determination. *

*/ public EyeOpen getEyesOpen() { return eyesOpen; } /** *

* Indicates whether or not the eyes on the face are open, and the * confidence level in the determination. *

* * @param eyesOpen

* Indicates whether or not the eyes on the face are open, and * the confidence level in the determination. *

*/ public void setEyesOpen(EyeOpen eyesOpen) { this.eyesOpen = eyesOpen; } /** *

* Indicates whether or not the eyes on the face are open, and the * confidence level in the determination. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param eyesOpen

* Indicates whether or not the eyes on the face are open, and * the confidence level in the determination. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withEyesOpen(EyeOpen eyesOpen) { this.eyesOpen = eyesOpen; return this; } /** *

* Indicates whether or not the mouth on the face is open, and the * confidence level in the determination. *

* * @return

* Indicates whether or not the mouth on the face is open, and the * confidence level in the determination. *

*/ public MouthOpen getMouthOpen() { return mouthOpen; } /** *

* Indicates whether or not the mouth on the face is open, and the * confidence level in the determination. *

* * @param mouthOpen

* Indicates whether or not the mouth on the face is open, and * the confidence level in the determination. *

*/ public void setMouthOpen(MouthOpen mouthOpen) { this.mouthOpen = mouthOpen; } /** *

* Indicates whether or not the mouth on the face is open, and the * confidence level in the determination. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param mouthOpen

* Indicates whether or not the mouth on the face is open, and * the confidence level in the determination. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withMouthOpen(MouthOpen mouthOpen) { this.mouthOpen = mouthOpen; return this; } /** *

* The emotions that appear to be expressed on the face, and the confidence * level in the determination. The API is only making a determination of the * physical appearance of a person's face. It is not a determination of the * person’s internal emotional state and should not be used in such a way. * For example, a person pretending to have a sad face might not be sad * emotionally. *

* * @return

* The emotions that appear to be expressed on the face, and the * confidence level in the determination. The API is only making a * determination of the physical appearance of a person's face. It * is not a determination of the person’s internal emotional state * and should not be used in such a way. For example, a person * pretending to have a sad face might not be sad emotionally. *

*/ public java.util.List getEmotions() { return emotions; } /** *

* The emotions that appear to be expressed on the face, and the confidence * level in the determination. The API is only making a determination of the * physical appearance of a person's face. It is not a determination of the * person’s internal emotional state and should not be used in such a way. * For example, a person pretending to have a sad face might not be sad * emotionally. *

* * @param emotions

* The emotions that appear to be expressed on the face, and the * confidence level in the determination. The API is only making * a determination of the physical appearance of a person's face. * It is not a determination of the person’s internal emotional * state and should not be used in such a way. For example, a * person pretending to have a sad face might not be sad * emotionally. *

*/ public void setEmotions(java.util.Collection emotions) { if (emotions == null) { this.emotions = null; return; } this.emotions = new java.util.ArrayList(emotions); } /** *

* The emotions that appear to be expressed on the face, and the confidence * level in the determination. The API is only making a determination of the * physical appearance of a person's face. It is not a determination of the * person’s internal emotional state and should not be used in such a way. * For example, a person pretending to have a sad face might not be sad * emotionally. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param emotions

* The emotions that appear to be expressed on the face, and the * confidence level in the determination. The API is only making * a determination of the physical appearance of a person's face. * It is not a determination of the person’s internal emotional * state and should not be used in such a way. For example, a * person pretending to have a sad face might not be sad * emotionally. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withEmotions(Emotion... emotions) { if (getEmotions() == null) { this.emotions = new java.util.ArrayList(emotions.length); } for (Emotion value : emotions) { this.emotions.add(value); } return this; } /** *

* The emotions that appear to be expressed on the face, and the confidence * level in the determination. The API is only making a determination of the * physical appearance of a person's face. It is not a determination of the * person’s internal emotional state and should not be used in such a way. * For example, a person pretending to have a sad face might not be sad * emotionally. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param emotions

* The emotions that appear to be expressed on the face, and the * confidence level in the determination. The API is only making * a determination of the physical appearance of a person's face. * It is not a determination of the person’s internal emotional * state and should not be used in such a way. For example, a * person pretending to have a sad face might not be sad * emotionally. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withEmotions(java.util.Collection emotions) { setEmotions(emotions); return this; } /** *

* Indicates the location of landmarks on the face. Default attribute. *

* * @return

* Indicates the location of landmarks on the face. Default * attribute. *

*/ public java.util.List getLandmarks() { return landmarks; } /** *

* Indicates the location of landmarks on the face. Default attribute. *

* * @param landmarks

* Indicates the location of landmarks on the face. Default * attribute. *

*/ public void setLandmarks(java.util.Collection landmarks) { if (landmarks == null) { this.landmarks = null; return; } this.landmarks = new java.util.ArrayList(landmarks); } /** *

* Indicates the location of landmarks on the face. Default attribute. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param landmarks

* Indicates the location of landmarks on the face. Default * attribute. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withLandmarks(Landmark... landmarks) { if (getLandmarks() == null) { this.landmarks = new java.util.ArrayList(landmarks.length); } for (Landmark value : landmarks) { this.landmarks.add(value); } return this; } /** *

* Indicates the location of landmarks on the face. Default attribute. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param landmarks

* Indicates the location of landmarks on the face. Default * attribute. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withLandmarks(java.util.Collection landmarks) { setLandmarks(landmarks); return this; } /** *

* Indicates the pose of the face as determined by its pitch, roll, and yaw. * Default attribute. *

* * @return

* Indicates the pose of the face as determined by its pitch, roll, * and yaw. Default attribute. *

*/ public Pose getPose() { return pose; } /** *

* Indicates the pose of the face as determined by its pitch, roll, and yaw. * Default attribute. *

* * @param pose

* Indicates the pose of the face as determined by its pitch, * roll, and yaw. Default attribute. *

*/ public void setPose(Pose pose) { this.pose = pose; } /** *

* Indicates the pose of the face as determined by its pitch, roll, and yaw. * Default attribute. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param pose

* Indicates the pose of the face as determined by its pitch, * roll, and yaw. Default attribute. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withPose(Pose pose) { this.pose = pose; return this; } /** *

* Identifies image brightness and sharpness. Default attribute. *

* * @return

* Identifies image brightness and sharpness. Default attribute. *

*/ public ImageQuality getQuality() { return quality; } /** *

* Identifies image brightness and sharpness. Default attribute. *

* * @param quality

* Identifies image brightness and sharpness. Default attribute. *

*/ public void setQuality(ImageQuality quality) { this.quality = quality; } /** *

* Identifies image brightness and sharpness. Default attribute. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param quality

* Identifies image brightness and sharpness. Default attribute. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withQuality(ImageQuality quality) { this.quality = quality; return this; } /** *

* Confidence level that the bounding box contains a face (and not a * different object such as a tree). Default attribute. *

*

* Constraints:
* Length: 0.0 - 100.0
* * @return

* Confidence level that the bounding box contains a face (and not a * different object such as a tree). Default attribute. *

*/ public Float getConfidence() { return confidence; } /** *

* Confidence level that the bounding box contains a face (and not a * different object such as a tree). Default attribute. *

*

* Constraints:
* Length: 0.0 - 100.0
* * @param confidence

* Confidence level that the bounding box contains a face (and * not a different object such as a tree). Default attribute. *

*/ public void setConfidence(Float confidence) { this.confidence = confidence; } /** *

* Confidence level that the bounding box contains a face (and not a * different object such as a tree). Default attribute. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 0.0 - 100.0
* * @param confidence

* Confidence level that the bounding box contains a face (and * not a different object such as a tree). Default attribute. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withConfidence(Float confidence) { this.confidence = confidence; return this; } /** *

* FaceOccluded should return "true" with a high confidence * score if a detected face’s eyes, nose, and mouth are partially captured * or if they are covered by masks, dark sunglasses, cell phones, hands, or * other objects. FaceOccluded should return "false" with a * high confidence score if common occurrences that do not impact face * verification are detected, such as eye glasses, lightly tinted * sunglasses, strands of hair, and others. *

* * @return

* FaceOccluded should return "true" with a high * confidence score if a detected face’s eyes, nose, and mouth are * partially captured or if they are covered by masks, dark * sunglasses, cell phones, hands, or other objects. * FaceOccluded should return "false" with a high * confidence score if common occurrences that do not impact face * verification are detected, such as eye glasses, lightly tinted * sunglasses, strands of hair, and others. *

*/ public FaceOccluded getFaceOccluded() { return faceOccluded; } /** *

* FaceOccluded should return "true" with a high confidence * score if a detected face’s eyes, nose, and mouth are partially captured * or if they are covered by masks, dark sunglasses, cell phones, hands, or * other objects. FaceOccluded should return "false" with a * high confidence score if common occurrences that do not impact face * verification are detected, such as eye glasses, lightly tinted * sunglasses, strands of hair, and others. *

* * @param faceOccluded

* FaceOccluded should return "true" with a high * confidence score if a detected face’s eyes, nose, and mouth * are partially captured or if they are covered by masks, dark * sunglasses, cell phones, hands, or other objects. * FaceOccluded should return "false" with a high * confidence score if common occurrences that do not impact face * verification are detected, such as eye glasses, lightly tinted * sunglasses, strands of hair, and others. *

*/ public void setFaceOccluded(FaceOccluded faceOccluded) { this.faceOccluded = faceOccluded; } /** *

* FaceOccluded should return "true" with a high confidence * score if a detected face’s eyes, nose, and mouth are partially captured * or if they are covered by masks, dark sunglasses, cell phones, hands, or * other objects. FaceOccluded should return "false" with a * high confidence score if common occurrences that do not impact face * verification are detected, such as eye glasses, lightly tinted * sunglasses, strands of hair, and others. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param faceOccluded

* FaceOccluded should return "true" with a high * confidence score if a detected face’s eyes, nose, and mouth * are partially captured or if they are covered by masks, dark * sunglasses, cell phones, hands, or other objects. * FaceOccluded should return "false" with a high * confidence score if common occurrences that do not impact face * verification are detected, such as eye glasses, lightly tinted * sunglasses, strands of hair, and others. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withFaceOccluded(FaceOccluded faceOccluded) { this.faceOccluded = faceOccluded; return this; } /** *

* Indicates the direction the eyes are gazing in, as defined by pitch and * yaw. *

* * @return

* Indicates the direction the eyes are gazing in, as defined by * pitch and yaw. *

*/ public EyeDirection getEyeDirection() { return eyeDirection; } /** *

* Indicates the direction the eyes are gazing in, as defined by pitch and * yaw. *

* * @param eyeDirection

* Indicates the direction the eyes are gazing in, as defined by * pitch and yaw. *

*/ public void setEyeDirection(EyeDirection eyeDirection) { this.eyeDirection = eyeDirection; } /** *

* Indicates the direction the eyes are gazing in, as defined by pitch and * yaw. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param eyeDirection

* Indicates the direction the eyes are gazing in, as defined by * pitch and yaw. *

* @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withEyeDirection(EyeDirection eyeDirection) { this.eyeDirection = eyeDirection; return this; } /** * 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 (getBoundingBox() != null) sb.append("BoundingBox: " + getBoundingBox() + ","); if (getAgeRange() != null) sb.append("AgeRange: " + getAgeRange() + ","); if (getSmile() != null) sb.append("Smile: " + getSmile() + ","); if (getEyeglasses() != null) sb.append("Eyeglasses: " + getEyeglasses() + ","); if (getSunglasses() != null) sb.append("Sunglasses: " + getSunglasses() + ","); if (getGender() != null) sb.append("Gender: " + getGender() + ","); if (getBeard() != null) sb.append("Beard: " + getBeard() + ","); if (getMustache() != null) sb.append("Mustache: " + getMustache() + ","); if (getEyesOpen() != null) sb.append("EyesOpen: " + getEyesOpen() + ","); if (getMouthOpen() != null) sb.append("MouthOpen: " + getMouthOpen() + ","); if (getEmotions() != null) sb.append("Emotions: " + getEmotions() + ","); if (getLandmarks() != null) sb.append("Landmarks: " + getLandmarks() + ","); if (getPose() != null) sb.append("Pose: " + getPose() + ","); if (getQuality() != null) sb.append("Quality: " + getQuality() + ","); if (getConfidence() != null) sb.append("Confidence: " + getConfidence() + ","); if (getFaceOccluded() != null) sb.append("FaceOccluded: " + getFaceOccluded() + ","); if (getEyeDirection() != null) sb.append("EyeDirection: " + getEyeDirection()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getAgeRange() == null) ? 0 : getAgeRange().hashCode()); hashCode = prime * hashCode + ((getSmile() == null) ? 0 : getSmile().hashCode()); hashCode = prime * hashCode + ((getEyeglasses() == null) ? 0 : getEyeglasses().hashCode()); hashCode = prime * hashCode + ((getSunglasses() == null) ? 0 : getSunglasses().hashCode()); hashCode = prime * hashCode + ((getGender() == null) ? 0 : getGender().hashCode()); hashCode = prime * hashCode + ((getBeard() == null) ? 0 : getBeard().hashCode()); hashCode = prime * hashCode + ((getMustache() == null) ? 0 : getMustache().hashCode()); hashCode = prime * hashCode + ((getEyesOpen() == null) ? 0 : getEyesOpen().hashCode()); hashCode = prime * hashCode + ((getMouthOpen() == null) ? 0 : getMouthOpen().hashCode()); hashCode = prime * hashCode + ((getEmotions() == null) ? 0 : getEmotions().hashCode()); hashCode = prime * hashCode + ((getLandmarks() == null) ? 0 : getLandmarks().hashCode()); hashCode = prime * hashCode + ((getPose() == null) ? 0 : getPose().hashCode()); hashCode = prime * hashCode + ((getQuality() == null) ? 0 : getQuality().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getFaceOccluded() == null) ? 0 : getFaceOccluded().hashCode()); hashCode = prime * hashCode + ((getEyeDirection() == null) ? 0 : getEyeDirection().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FaceDetail == false) return false; FaceDetail other = (FaceDetail) obj; if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == false) return false; if (other.getAgeRange() == null ^ this.getAgeRange() == null) return false; if (other.getAgeRange() != null && other.getAgeRange().equals(this.getAgeRange()) == false) return false; if (other.getSmile() == null ^ this.getSmile() == null) return false; if (other.getSmile() != null && other.getSmile().equals(this.getSmile()) == false) return false; if (other.getEyeglasses() == null ^ this.getEyeglasses() == null) return false; if (other.getEyeglasses() != null && other.getEyeglasses().equals(this.getEyeglasses()) == false) return false; if (other.getSunglasses() == null ^ this.getSunglasses() == null) return false; if (other.getSunglasses() != null && other.getSunglasses().equals(this.getSunglasses()) == false) return false; if (other.getGender() == null ^ this.getGender() == null) return false; if (other.getGender() != null && other.getGender().equals(this.getGender()) == false) return false; if (other.getBeard() == null ^ this.getBeard() == null) return false; if (other.getBeard() != null && other.getBeard().equals(this.getBeard()) == false) return false; if (other.getMustache() == null ^ this.getMustache() == null) return false; if (other.getMustache() != null && other.getMustache().equals(this.getMustache()) == false) return false; if (other.getEyesOpen() == null ^ this.getEyesOpen() == null) return false; if (other.getEyesOpen() != null && other.getEyesOpen().equals(this.getEyesOpen()) == false) return false; if (other.getMouthOpen() == null ^ this.getMouthOpen() == null) return false; if (other.getMouthOpen() != null && other.getMouthOpen().equals(this.getMouthOpen()) == false) return false; if (other.getEmotions() == null ^ this.getEmotions() == null) return false; if (other.getEmotions() != null && other.getEmotions().equals(this.getEmotions()) == false) return false; if (other.getLandmarks() == null ^ this.getLandmarks() == null) return false; if (other.getLandmarks() != null && other.getLandmarks().equals(this.getLandmarks()) == false) return false; if (other.getPose() == null ^ this.getPose() == null) return false; if (other.getPose() != null && other.getPose().equals(this.getPose()) == false) return false; if (other.getQuality() == null ^ this.getQuality() == null) return false; if (other.getQuality() != null && other.getQuality().equals(this.getQuality()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null) return false; if (other.getConfidence() != null && other.getConfidence().equals(this.getConfidence()) == false) return false; if (other.getFaceOccluded() == null ^ this.getFaceOccluded() == null) return false; if (other.getFaceOccluded() != null && other.getFaceOccluded().equals(this.getFaceOccluded()) == false) return false; if (other.getEyeDirection() == null ^ this.getEyeDirection() == null) return false; if (other.getEyeDirection() != null && other.getEyeDirection().equals(this.getEyeDirection()) == false) return false; return true; } }