@Test public void testResetToZero() { Speed theSpeed = new Speed(10); Speed theOtherSpeed = theSpeed.resetToZero(); assertEquals(0l, theOtherSpeed.get(), 0); assertNotSame(theSpeed, theOtherSpeed); }
@ReflectiveMethod public Speed resetToZero() { return new Speed(0); }
Speed implements Reflectable, Distributable { @ReflectiveMethod public Speed resetToZero() { return new Speed(0); } }
Speed implements Reflectable, Distributable { @ReflectiveMethod public Speed resetToZero() { return new Speed(0); } Speed(long aSpeed); }
Speed implements Reflectable, Distributable { @ReflectiveMethod public Speed resetToZero() { return new Speed(0); } 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 { @ReflectiveMethod public Speed resetToZero() { return new Speed(0); } 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; }