@Test public void testAdd() { TransitionFactory amf = TransitionFactory.newBundle(); MockVMBuilder vmb = new MockVMBuilder(); amf.add(vmb); for (VMState src : vmb.getSourceStates()) { Assert.assertEquals(amf.getBuilder(src, vmb.getDestinationState()), vmb); } MockNodeBuilder nb = new MockNodeBuilder(); amf.add(nb); Assert.assertEquals(amf.getBuilder(nb.getSourceState()), nb); }
public void add(VMTransitionBuilder b) { Map<VMState, VMTransitionBuilder> m = vmAMB2.get(b.getDestinationState()); for (VMState src : b.getSourceStates()) { m.put(src, b); } }
TransitionFactory { public void add(VMTransitionBuilder b) { Map<VMState, VMTransitionBuilder> m = vmAMB2.get(b.getDestinationState()); for (VMState src : b.getSourceStates()) { m.put(src, b); } } }
TransitionFactory { public void add(VMTransitionBuilder b) { Map<VMState, VMTransitionBuilder> m = vmAMB2.get(b.getDestinationState()); for (VMState src : b.getSourceStates()) { m.put(src, b); } } TransitionFactory(); }
TransitionFactory { public void add(VMTransitionBuilder b) { Map<VMState, VMTransitionBuilder> m = vmAMB2.get(b.getDestinationState()); for (VMState src : b.getSourceStates()) { m.put(src, b); } } TransitionFactory(); void add(VMTransitionBuilder b); boolean remove(VMTransitionBuilder b); boolean remove(NodeTransitionBuilder b); void add(NodeTransitionBuilder b); VMTransitionBuilder getBuilder(VMState srcState, VMState dstState); NodeTransitionBuilder getBuilder(NodeState srcState); static TransitionFactory newBundle(); @Override String toString(); }
TransitionFactory { public void add(VMTransitionBuilder b) { Map<VMState, VMTransitionBuilder> m = vmAMB2.get(b.getDestinationState()); for (VMState src : b.getSourceStates()) { m.put(src, b); } } TransitionFactory(); void add(VMTransitionBuilder b); boolean remove(VMTransitionBuilder b); boolean remove(NodeTransitionBuilder b); void add(NodeTransitionBuilder b); VMTransitionBuilder getBuilder(VMState srcState, VMState dstState); NodeTransitionBuilder getBuilder(NodeState srcState); static TransitionFactory newBundle(); @Override String toString();  }