@Test public void testCreate () { EdgeSelectionStrategyFactory factory = new EdgeSelectionStrategyFactory (); assertTrue (factory.create (RandomTransitionSelector.NAME, null, null) instanceof RandomTransitionSelector); assertTrue (factory.create (WeightedTransitionSelector.NAME, null, null) instanceof WeightedTransitionSelector); try { factory.create ("unknown selector name", null, null); fail ("no exception"); } catch (ExecutionException ee) { } }
TransitionSelectionStrategy create (String selector, DirectedGraph mainGraph, RunTime runTime) { if (RandomTransitionSelector.NAME.equals (selector)) { return new RandomTransitionSelector (mainGraph, runTime, new DefaultRandomNumberGenerator ()); } else if (WeightedTransitionSelector.NAME.equals (selector)) { return new WeightedTransitionSelector (); } else { throw new ExecutionException ("unknown edge selection strategy: %s", selector); } }
EdgeSelectionStrategyFactory { TransitionSelectionStrategy create (String selector, DirectedGraph mainGraph, RunTime runTime) { if (RandomTransitionSelector.NAME.equals (selector)) { return new RandomTransitionSelector (mainGraph, runTime, new DefaultRandomNumberGenerator ()); } else if (WeightedTransitionSelector.NAME.equals (selector)) { return new WeightedTransitionSelector (); } else { throw new ExecutionException ("unknown edge selection strategy: %s", selector); } } }
EdgeSelectionStrategyFactory { TransitionSelectionStrategy create (String selector, DirectedGraph mainGraph, RunTime runTime) { if (RandomTransitionSelector.NAME.equals (selector)) { return new RandomTransitionSelector (mainGraph, runTime, new DefaultRandomNumberGenerator ()); } else if (WeightedTransitionSelector.NAME.equals (selector)) { return new WeightedTransitionSelector (); } else { throw new ExecutionException ("unknown edge selection strategy: %s", selector); } }  }
EdgeSelectionStrategyFactory { TransitionSelectionStrategy create (String selector, DirectedGraph mainGraph, RunTime runTime) { if (RandomTransitionSelector.NAME.equals (selector)) { return new RandomTransitionSelector (mainGraph, runTime, new DefaultRandomNumberGenerator ()); } else if (WeightedTransitionSelector.NAME.equals (selector)) { return new WeightedTransitionSelector (); } else { throw new ExecutionException ("unknown edge selection strategy: %s", selector); } }   }
EdgeSelectionStrategyFactory { TransitionSelectionStrategy create (String selector, DirectedGraph mainGraph, RunTime runTime) { if (RandomTransitionSelector.NAME.equals (selector)) { return new RandomTransitionSelector (mainGraph, runTime, new DefaultRandomNumberGenerator ()); } else if (WeightedTransitionSelector.NAME.equals (selector)) { return new WeightedTransitionSelector (); } else { throw new ExecutionException ("unknown edge selection strategy: %s", selector); } }    }