@Test public void testDeserialize() throws Exception { Map<String, Object> theData = new HashMap<>(); theData.put("speed", "28"); Speed theSpeed = Speed.deserialize(theData); assertEquals(28L, theSpeed.get(), 0); }
public static Speed deserialize(Map<String, Object> aSerializedData) { long theSpeed = Long.valueOf((String) aSerializedData.get("speed")); return new Speed(theSpeed); }
Speed implements Reflectable, Distributable { public static Speed deserialize(Map<String, Object> aSerializedData) { long theSpeed = Long.valueOf((String) aSerializedData.get("speed")); return new Speed(theSpeed); } }
Speed implements Reflectable, Distributable { public static Speed deserialize(Map<String, Object> aSerializedData) { long theSpeed = Long.valueOf((String) aSerializedData.get("speed")); return new Speed(theSpeed); } Speed(long aSpeed); }
Speed implements Reflectable, Distributable { public static Speed deserialize(Map<String, Object> aSerializedData) { long theSpeed = Long.valueOf((String) aSerializedData.get("speed")); return new Speed(theSpeed); } Speed(long aSpeed); Long get(); @ReflectiveMethod Speed incrementBy(int aAmount); @ReflectiveMethod Speed resetToZero(); @Override SpeedClassInformation getClassInformation(); @Override Map<String, Object> serialize(); static Speed deserialize(Map<String, Object> aSerializedData); }
Speed implements Reflectable, Distributable { public static Speed deserialize(Map<String, Object> aSerializedData) { long theSpeed = Long.valueOf((String) aSerializedData.get("speed")); return new Speed(theSpeed); } Speed(long aSpeed); Long get(); @ReflectiveMethod Speed incrementBy(int aAmount); @ReflectiveMethod Speed resetToZero(); @Override SpeedClassInformation getClassInformation(); @Override Map<String, Object> serialize(); static Speed deserialize(Map<String, Object> aSerializedData); final long speed; }