Update paths and tests.

This commit is contained in:
Holt59
2018-03-20 21:31:01 +01:00
parent b4e666d08d
commit 46436f81f3
2 changed files with 77 additions and 20 deletions

View File

@@ -167,7 +167,16 @@ public class Path {
* @return true if this path is empty, false otherwise.
*/
public boolean isEmpty() {
return arcs.isEmpty();
return this.origin == null;
}
/**
* Get the number of <b>nodes</b> in this path.
*
* @return Number of nodes in this path.
*/
public int size() {
return 1 + this.arcs.size();
}
/**