@Test public void test() { Network network = EurostagTutorialExample1Factory.create(); assertTrue(network.getLine("NHV1_NHV2_1").getTerminal1().isConnected()); assertTrue(network.getLine("NHV1_NHV2_1").getTerminal2().isConnected()); BranchTripping tripping1 = new BranchTripping("NHV1_NHV2_1", "VLHV1"); BranchTripping tripping2 = new BranchTripping("NHV1_NHV2_1", "VLHV2"); CompoundModificationTask task = new CompoundModificationTask(tripping1, tripping2); task.modify(network, null); assertFalse(network.getLine("NHV1_NHV2_1").getTerminal1().isConnected()); assertFalse(network.getLine("NHV1_NHV2_1").getTerminal2().isConnected()); }
@Override public void modify(Network network, ComputationManager computationManager) { for (ModificationTask subTask : subTasks) { subTask.modify(network, computationManager); } }
CompoundModificationTask implements ModificationTask { @Override public void modify(Network network, ComputationManager computationManager) { for (ModificationTask subTask : subTasks) { subTask.modify(network, computationManager); } } }
CompoundModificationTask implements ModificationTask { @Override public void modify(Network network, ComputationManager computationManager) { for (ModificationTask subTask : subTasks) { subTask.modify(network, computationManager); } } CompoundModificationTask(List<ModificationTask> subTasks);  CompoundModificationTask(ModificationTask... subTasks); }
CompoundModificationTask implements ModificationTask { @Override public void modify(Network network, ComputationManager computationManager) { for (ModificationTask subTask : subTasks) { subTask.modify(network, computationManager); } } CompoundModificationTask(List<ModificationTask> subTasks);  CompoundModificationTask(ModificationTask... subTasks); @Override void modify(Network network, ComputationManager computationManager); }
CompoundModificationTask implements ModificationTask { @Override public void modify(Network network, ComputationManager computationManager) { for (ModificationTask subTask : subTasks) { subTask.modify(network, computationManager); } } CompoundModificationTask(List<ModificationTask> subTasks);  CompoundModificationTask(ModificationTask... subTasks); @Override void modify(Network network, ComputationManager computationManager);  }