@Test(dependsOnMethods = {"testInstantiateAndIsRegistered", "testUnregister"}) public void testRegister() { DurationEvaluators d = new DurationEvaluators(); Assert.assertTrue(d.register(MigrateVM.class, new ConstantActionDuration<>(7))); Assert.assertFalse(d.register(MigrateVM.class, new ConstantActionDuration<>(3))); }
public boolean register(Class<? extends Action> a, ActionDurationEvaluator e) { return durations.put(a, e) == null; }
DurationEvaluators { public boolean register(Class<? extends Action> a, ActionDurationEvaluator e) { return durations.put(a, e) == null; } }
DurationEvaluators { public boolean register(Class<? extends Action> a, ActionDurationEvaluator e) { return durations.put(a, e) == null; } DurationEvaluators(); }
DurationEvaluators { public boolean register(Class<? extends Action> a, ActionDurationEvaluator e) { return durations.put(a, e) == null; } DurationEvaluators(); boolean register(Class<? extends Action> a, ActionDurationEvaluator e); boolean unRegister(Class<? extends Action> a); boolean isRegistered(Class<? extends Action> a); ActionDurationEvaluator<Element> getEvaluator(Class<? extends Action> a); int evaluate(Model mo, Class<? extends Action> a, Element e); static DurationEvaluators newBundle(); }
DurationEvaluators { public boolean register(Class<? extends Action> a, ActionDurationEvaluator e) { return durations.put(a, e) == null; } DurationEvaluators(); boolean register(Class<? extends Action> a, ActionDurationEvaluator e); boolean unRegister(Class<? extends Action> a); boolean isRegistered(Class<? extends Action> a); ActionDurationEvaluator<Element> getEvaluator(Class<? extends Action> a); int evaluate(Model mo, Class<? extends Action> a, Element e); static DurationEvaluators newBundle();  }