/** * <p> * Type of landmark. * </p> * * @param type * Type of landmark. * @return Returns a reference to this object so that method calls can be chained together. * @see LandmarkType */ public Landmark withType(String type) { setType(type); return this; }
if (context.testExpression("Type", targetDepth)) { context.nextToken(); landmark.setType(context.getUnmarshaller(String.class).unmarshall(context));
public Landmark unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } Landmark landmark = new Landmark(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Type")) { landmark.setType(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("X")) { landmark.setX(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Y")) { landmark.setY(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return landmark; }