suite changement et correction bug

This commit is contained in:
2022-11-29 15:34:17 +01:00
parent 1351345df5
commit 86b93e43d5
3 changed files with 56 additions and 6 deletions

View File

@@ -27,6 +27,20 @@ public class ChangementNP implements Changement {
this.b=b;
this.e=e;
}
public ChangementNP(Groupe a, Etudiant e, Groupe b, int id){
Objects.requireNonNull(a,"On ne peut pas créer un changement avec un groupe à quitter null");
Objects.requireNonNull(b,"On ne peut pas créer un changement avec un groupe à rejoindre null");
Objects.requireNonNull(e,"On ne peut pas créer un changement concernant un étudiant null");
this.id=id;
this.a=a;
this.b=b;
this.e=e;
if(this.id>this.nextId){
this.nextId=this.id;
}
}
/**
* permet de récupérer l'identifiant du changement (référence interne sans intérêt irl).