revert(model): Path.concatenate
This commit is contained in:
parent
8f7639cea4
commit
d0e970b2ab
1 changed files with 2 additions and 2 deletions
|
@ -115,7 +115,7 @@ public class Path {
|
||||||
* map do not match, or the end of a path is not the beginning of the
|
* map do not match, or the end of a path is not the beginning of the
|
||||||
* next).
|
* next).
|
||||||
*/
|
*/
|
||||||
public static Path concatenate(int indice, Path... paths) throws IllegalArgumentException {
|
public static Path concatenate(Path... paths) throws IllegalArgumentException {
|
||||||
if (paths.length == 0) {
|
if (paths.length == 0) {
|
||||||
throw new IllegalArgumentException("Cannot concatenate an empty list of paths.");
|
throw new IllegalArgumentException("Cannot concatenate an empty list of paths.");
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ public class Path {
|
||||||
}
|
}
|
||||||
ArrayList<Arc> arcs = new ArrayList<>();
|
ArrayList<Arc> arcs = new ArrayList<>();
|
||||||
for (Path path: paths) {
|
for (Path path: paths) {
|
||||||
arcs.addAll(indice, path.getArcs());
|
arcs.addAll(path.getArcs());
|
||||||
}
|
}
|
||||||
Path path = new Path(paths[0].getGraph(), arcs);
|
Path path = new Path(paths[0].getGraph(), arcs);
|
||||||
if (!path.isValid()) {
|
if (!path.isValid()) {
|
||||||
|
|
Loading…
Reference in a new issue