/** * <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; }
boundingBox.setTop(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; }