doc(model): comment Node.removeArc

This commit is contained in:
Paul Alnet 2024-05-25 14:47:40 +02:00
parent 69ebb4fd01
commit 8f7639cea4
2 changed files with 5 additions and 0 deletions

View file

@ -157,6 +157,9 @@ public final class Node { //implements Comparable<Node> {
// return Integer.compare(getId(), other.getId());
// }
/*
* Remove a successor arc. Used for the marathon path-finding algorithm.
*/
public void removeArc(Arc arcToRemove) {
successors.remove(arcToRemove);
}

View file

@ -15,6 +15,7 @@ import org.insa.graphs.model.Path;
import org.insa.graphs.model.RoadInformation;
import org.insa.graphs.model.RoadInformation.RoadType;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
public class PathTest {
@ -83,6 +84,7 @@ public class PathTest {
}
@Test(expected = UnsupportedOperationException.class)
@Ignore // Mutability required for marathon path-finding algo
public void testImmutability() {
emptyPath.getArcs().add(a2b);
}