diff --git a/be-graphes-model/src/main/java/org/insa/graphs/model/Path.java b/be-graphes-model/src/main/java/org/insa/graphs/model/Path.java index 63db68f..c791286 100644 --- a/be-graphes-model/src/main/java/org/insa/graphs/model/Path.java +++ b/be-graphes-model/src/main/java/org/insa/graphs/model/Path.java @@ -115,7 +115,7 @@ public class Path { * map do not match, or the end of a path is not the beginning of the * next). */ - public static Path concatenate(int indice, Path... paths) throws IllegalArgumentException { + public static Path concatenate(Path... paths) throws IllegalArgumentException { if (paths.length == 0) { throw new IllegalArgumentException("Cannot concatenate an empty list of paths."); } @@ -128,7 +128,7 @@ public class Path { } ArrayList arcs = new ArrayList<>(); for (Path path: paths) { - arcs.addAll(indice, path.getArcs()); + arcs.addAll(path.getArcs()); } Path path = new Path(paths[0].getGraph(), arcs); if (!path.isValid()) {