/** * <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; }
boundingBox.setHeight(context.getUnmarshaller(Float.class).unmarshall(context));
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; }