résolution de conflit après stash pop
This commit is contained in:
parent
ae4152eae8
commit
8a304e8807
1 changed files with 7 additions and 4 deletions
|
@ -34,11 +34,14 @@ public class Path {
|
|||
public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes)
|
||||
throws IllegalArgumentException {
|
||||
|
||||
if (nodes == null || nodes.isEmpty())
|
||||
if (nodes == null || nodes.isEmpty()) {
|
||||
return new Path(graph);
|
||||
if (nodes.size() == 1)
|
||||
return new Path(graph, nodes.get(0));
|
||||
|
||||
// throw new IllegalArgumentException("La liste des nodes est vide"); ici il
|
||||
// ne faut pas throw une erreur mais return un chemin vide.
|
||||
}
|
||||
if (nodes.size() == 1) {
|
||||
return new Path(graph, nodes.get(0)); /* chemin de 1 point(node) */
|
||||
}
|
||||
ArrayList<Arc> finalList = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < nodes.size() - 1; i++) {
|
||||
|
|
Loading…
Reference in a new issue