séance 1

This commit is contained in:
Alexis Berger 2024-04-05 10:12:38 +02:00
parent 32f99dba49
commit 9566146a3d
2 changed files with 13 additions and 3 deletions

View file

@ -201,8 +201,18 @@ public class Path {
* @deprecated Need to be implemented.
*/
public boolean isValid() {
// TODO:
return false;
if (!(this.isEmpty() || (this.arcs.size()==0 && this.origin!=null) )){
Arc previousArc=null;
for (Arc arc: this.arcs){
if (previousArc!=null) {
if (previousArc.getDestination()!=arc.getOrigin()) return false;
}
previousArc = arc;
}
};
return true;
}
/**

View file

@ -12,7 +12,7 @@
<name>be-graphes-all</name>
<properties>
<jdk.version>17</jdk.version>
<jdk.version>11</jdk.version>
<maven.compiler.source>${jdk.version}</maven.compiler.source>
<maven.compiler.target>${jdk.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>