séance 1
This commit is contained in:
parent
32f99dba49
commit
9566146a3d
2 changed files with 13 additions and 3 deletions
|
@ -201,8 +201,18 @@ public class Path {
|
||||||
* @deprecated Need to be implemented.
|
* @deprecated Need to be implemented.
|
||||||
*/
|
*/
|
||||||
public boolean isValid() {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
||||||
<name>be-graphes-all</name>
|
<name>be-graphes-all</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<jdk.version>17</jdk.version>
|
<jdk.version>11</jdk.version>
|
||||||
<maven.compiler.source>${jdk.version}</maven.compiler.source>
|
<maven.compiler.source>${jdk.version}</maven.compiler.source>
|
||||||
<maven.compiler.target>${jdk.version}</maven.compiler.target>
|
<maven.compiler.target>${jdk.version}</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
Loading…
Reference in a new issue