@Test public void testDeserialize() throws Exception { Map<String, Object> theData = new HashMap<>(); theData.put("x", "10.0"); theData.put("y", "20.0"); Position thePosition = Position.deserialize(theData); assertEquals(10f, thePosition.x, 0); assertEquals(20f, thePosition.y, 0); }
public static Position deserialize(Map<String, Object> aSerializedStructure) { float theX = Float.valueOf((String) aSerializedStructure.get("x")); float theY = Float.valueOf((String) aSerializedStructure.get("y")); return new Position(theX, theY); }
Position implements Reflectable<PositionClassInformation>, Distributable { public static Position deserialize(Map<String, Object> aSerializedStructure) { float theX = Float.valueOf((String) aSerializedStructure.get("x")); float theY = Float.valueOf((String) aSerializedStructure.get("y")); return new Position(theX, theY); } }
Position implements Reflectable<PositionClassInformation>, Distributable { public static Position deserialize(Map<String, Object> aSerializedStructure) { float theX = Float.valueOf((String) aSerializedStructure.get("x")); float theY = Float.valueOf((String) aSerializedStructure.get("y")); return new Position(theX, theY); } Position();  Position(float aX, float aY);  Position(double aX, double aY); }
Position implements Reflectable<PositionClassInformation>, Distributable { public static Position deserialize(Map<String, Object> aSerializedStructure) { float theX = Float.valueOf((String) aSerializedStructure.get("x")); float theY = Float.valueOf((String) aSerializedStructure.get("y")); return new Position(theX, theY); } Position();  Position(float aX, float aY);  Position(double aX, double aY); @Override boolean equals(Object o); @Override int hashCode(); @Override PositionClassInformation getClassInformation(); @ReflectiveMethod Position add(Position aOffset); @ReflectiveMethod Position changeX(Float aNewX); @ReflectiveMethod Position changeY(Float aNewY); @ReflectiveMethod Position snapToGrid(int aGridWidth, int aGridHeight); @Override Map<String, Object> serialize(); static Position deserialize(Map<String, Object> aSerializedStructure); Position translate(Angle aAngle, double aDistance); }
Position implements Reflectable<PositionClassInformation>, Distributable { public static Position deserialize(Map<String, Object> aSerializedStructure) { float theX = Float.valueOf((String) aSerializedStructure.get("x")); float theY = Float.valueOf((String) aSerializedStructure.get("y")); return new Position(theX, theY); } Position();  Position(float aX, float aY);  Position(double aX, double aY); @Override boolean equals(Object o); @Override int hashCode(); @Override PositionClassInformation getClassInformation(); @ReflectiveMethod Position add(Position aOffset); @ReflectiveMethod Position changeX(Float aNewX); @ReflectiveMethod Position changeY(Float aNewY); @ReflectiveMethod Position snapToGrid(int aGridWidth, int aGridHeight); @Override Map<String, Object> serialize(); static Position deserialize(Map<String, Object> aSerializedStructure); Position translate(Angle aAngle, double aDistance); @ReflectiveField
    final float x; @ReflectiveField
    final float y; }