@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().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()); return hashCode; }
/** * <p> * Bounding box of the face. * </p> * * @param boundingBox * Bounding box of the face. * @return Returns a reference to this object so that method calls can be chained together. */ public ComparedFace withBoundingBox(BoundingBox boundingBox) { setBoundingBox(boundingBox); return this; }
/** * <p> * Level of confidence that what the bounding box contains is a face. * </p> * * @param confidence * Level of confidence that what the bounding box contains is a face. * @return Returns a reference to this object so that method calls can be chained together. */ public ComparedFace withConfidence(Float confidence) { setConfidence(confidence); return this; }
public ComparedFace unmarshall(JsonUnmarshallerContext context) throws Exception { ComparedFace comparedFace = new ComparedFace(); if (context.testExpression("BoundingBox", targetDepth)) { context.nextToken(); comparedFace.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance().unmarshall(context)); comparedFace.setConfidence(context.getUnmarshaller(Float.class).unmarshall(context)); comparedFace.setLandmarks(new ListUnmarshaller<Landmark>(LandmarkJsonUnmarshaller.getInstance()).unmarshall(context)); comparedFace.setPose(PoseJsonUnmarshaller.getInstance().unmarshall(context)); comparedFace.setQuality(ImageQualityJsonUnmarshaller.getInstance().unmarshall(context));
@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; }
@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; }
/** * <p> * An array of facial landmarks. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param landmarks <p> * An array of facial landmarks. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public ComparedFace withLandmarks(Landmark... landmarks) { if (getLandmarks() == null) { this.landmarks = new java.util.ArrayList<Landmark>(landmarks.length); } for (Landmark value : landmarks) { this.landmarks.add(value); } return this; }
return null; ComparedFace comparedFace = new ComparedFace(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("BoundingBox")) { comparedFace.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Confidence")) { comparedFace.setConfidence(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Landmarks")) { comparedFace.setLandmarks(new ListUnmarshaller<Landmark>(LandmarkJsonUnmarshaller .getInstance() comparedFace.setPose(PoseJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Quality")) { comparedFace.setQuality(ImageQualityJsonUnmarshaller.getInstance() .unmarshall(context)); } else {
@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; }
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)
return false; ComparedFace other = (ComparedFace) obj; if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == 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.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; return true;
@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; }
@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; } }
/** * 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 (getBoundingBox() != null) sb.append("BoundingBox: ").append(getBoundingBox()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()).append(","); if (getLandmarks() != null) sb.append("Landmarks: ").append(getLandmarks()).append(","); if (getPose() != null) sb.append("Pose: ").append(getPose()).append(","); if (getQuality() != null) sb.append("Quality: ").append(getQuality()); 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; }
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)
/** * Marshall the given parameter object. */ public void marshall(ComparedFace comparedFace, ProtocolMarshaller protocolMarshaller) { if (comparedFace == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(comparedFace.getBoundingBox(), BOUNDINGBOX_BINDING); protocolMarshaller.marshall(comparedFace.getConfidence(), CONFIDENCE_BINDING); protocolMarshaller.marshall(comparedFace.getLandmarks(), LANDMARKS_BINDING); protocolMarshaller.marshall(comparedFace.getPose(), POSE_BINDING); protocolMarshaller.marshall(comparedFace.getQuality(), QUALITY_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 + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().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()); return hashCode; }
ComparedFace other = (ComparedFace) obj; if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == 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.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; return true;
/** * 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 (getConfidence() != null) sb.append("Confidence: " + getConfidence() + ","); if (getLandmarks() != null) sb.append("Landmarks: " + getLandmarks() + ","); if (getPose() != null) sb.append("Pose: " + getPose() + ","); if (getQuality() != null) sb.append("Quality: " + getQuality()); sb.append("}"); return sb.toString(); }