init commint
This commit is contained in:
38
Personnel.java
Normal file
38
Personnel.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package Monpack2;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Personnel {
|
||||
private String nom;
|
||||
public Personnel(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
public static ArrayList<Personnel> getPersonnelsNonIntervenus(ArrayList<Personnel> personnels, ArrayList<Intervention> interventions) {
|
||||
ArrayList<Personnel> result = new ArrayList<>();
|
||||
for (Personnel p : personnels) {
|
||||
boolean intervenu = false;
|
||||
for (Intervention i : interventions) {
|
||||
if (i.getParticipants().contains(p)) {
|
||||
intervenu = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!intervenu) {
|
||||
result.add(p);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public void afficherInfos() {
|
||||
// TODO Auto-generated method stub
|
||||
System.out.println("Nom : " + nom);
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user