@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getWidth() == null) ? 0 : getWidth().hashCode()); hashCode = prime * hashCode + ((getHeight() == null) ? 0 : getHeight().hashCode()); hashCode = prime * hashCode + ((getLeft() == null) ? 0 : getLeft().hashCode()); hashCode = prime * hashCode + ((getTop() == null) ? 0 : getTop().hashCode()); return hashCode; }
@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()); return hashCode; }
/** * <p> * Height of the bounding box as a ratio of the overall image height. * </p> * * @param height * Height of the bounding box as a ratio of the overall image height. * @return Returns a reference to this object so that method calls can be chained together. */ public BoundingBox withHeight(Float height) { setHeight(height); return this; }
public BoundingBox unmarshall(JsonUnmarshallerContext context) throws Exception { BoundingBox boundingBox = new BoundingBox(); if (context.testExpression("Width", targetDepth)) { context.nextToken(); boundingBox.setWidth(context.getUnmarshaller(Float.class).unmarshall(context)); boundingBox.setHeight(context.getUnmarshaller(Float.class).unmarshall(context)); boundingBox.setLeft(context.getUnmarshaller(Float.class).unmarshall(context)); boundingBox.setTop(context.getUnmarshaller(Float.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ComparedSourceImageFace == false) return false; ComparedSourceImageFace other = (ComparedSourceImageFace) 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; return true; }
/** * <p> * Top coordinate of the bounding box as a ratio of overall image height. * </p> * * @param top * Top coordinate of the bounding box as a ratio of overall image height. * @return Returns a reference to this object so that method calls can be chained together. */ public BoundingBox withTop(Float top) { setTop(top); return this; }
/** * <p> * Left coordinate of the bounding box as a ratio of overall image width. * </p> * * @param left * Left coordinate of the bounding box as a ratio of overall image width. * @return Returns a reference to this object so that method calls can be chained together. */ public BoundingBox withLeft(Float left) { setLeft(left); return this; }
public BoundingBox unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } BoundingBox boundingBox = new BoundingBox(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Width")) { boundingBox.setWidth(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Height")) { boundingBox.setHeight(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Left")) { boundingBox.setLeft(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Top")) { boundingBox.setTop(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return boundingBox; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Geometry == false) return false; Geometry other = (Geometry) obj; if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == false) return false; if (other.getPolygon() == null ^ this.getPolygon() == null) return false; if (other.getPolygon() != null && other.getPolygon().equals(this.getPolygon()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BoundingBox == false) return false; BoundingBox other = (BoundingBox) obj; if (other.getWidth() == null ^ this.getWidth() == null) return false; if (other.getWidth() != null && other.getWidth().equals(this.getWidth()) == false) return false; if (other.getHeight() == null ^ this.getHeight() == null) return false; if (other.getHeight() != null && other.getHeight().equals(this.getHeight()) == false) return false; if (other.getLeft() == null ^ this.getLeft() == null) return false; if (other.getLeft() != null && other.getLeft().equals(this.getLeft()) == false) return false; if (other.getTop() == null ^ this.getTop() == null) return false; if (other.getTop() != null && other.getTop().equals(this.getTop()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getPolygon() == null) ? 0 : getPolygon().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Instance == false) return false; Instance other = (Instance) 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; 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 (getWidth() != null) sb.append("Width: ").append(getWidth()).append(","); if (getHeight() != null) sb.append("Height: ").append(getHeight()).append(","); if (getLeft() != null) sb.append("Left: ").append(getLeft()).append(","); if (getTop() != null) sb.append("Top: ").append(getTop()); 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 + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SearchFacesByImageResult == false) return false; SearchFacesByImageResult other = (SearchFacesByImageResult) obj; if (other.getSearchedFaceBoundingBox() == null ^ this.getSearchedFaceBoundingBox() == null) return false; if (other.getSearchedFaceBoundingBox() != null && other.getSearchedFaceBoundingBox().equals(this.getSearchedFaceBoundingBox()) == false) return false; if (other.getSearchedFaceConfidence() == null ^ this.getSearchedFaceConfidence() == null) return false; if (other.getSearchedFaceConfidence() != null && other.getSearchedFaceConfidence().equals(this.getSearchedFaceConfidence()) == false) return false; if (other.getFaceMatches() == null ^ this.getFaceMatches() == null) return false; if (other.getFaceMatches() != null && other.getFaceMatches().equals(this.getFaceMatches()) == false) return false; if (other.getFaceModelVersion() == null ^ this.getFaceModelVersion() == null) return false; if (other.getFaceModelVersion() != null && other.getFaceModelVersion().equals(this.getFaceModelVersion()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(BoundingBox boundingBox, ProtocolMarshaller protocolMarshaller) { if (boundingBox == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(boundingBox.getWidth(), WIDTH_BINDING); protocolMarshaller.marshall(boundingBox.getHeight(), HEIGHT_BINDING); protocolMarshaller.marshall(boundingBox.getLeft(), LEFT_BINDING); protocolMarshaller.marshall(boundingBox.getTop(), TOP_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 + ((getSearchedFaceBoundingBox() == null) ? 0 : getSearchedFaceBoundingBox().hashCode()); hashCode = prime * hashCode + ((getSearchedFaceConfidence() == null) ? 0 : getSearchedFaceConfidence().hashCode()); hashCode = prime * hashCode + ((getFaceMatches() == null) ? 0 : getFaceMatches().hashCode()); hashCode = prime * hashCode + ((getFaceModelVersion() == null) ? 0 : getFaceModelVersion().hashCode()); return hashCode; }
if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == false) return false; if (other.getImageId() == null ^ this.getImageId() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getWidth() == null) ? 0 : getWidth().hashCode()); hashCode = prime * hashCode + ((getHeight() == null) ? 0 : getHeight().hashCode()); hashCode = prime * hashCode + ((getLeft() == null) ? 0 : getLeft().hashCode()); hashCode = prime * hashCode + ((getTop() == null) ? 0 : getTop().hashCode()); return hashCode; }
@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()); return hashCode; }