2021-12-09 17:54:08 +00:00
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class Lieu {
|
|
|
|
String nom;
|
|
|
|
Condition deposable;
|
|
|
|
Condition depart;
|
|
|
|
Condition fin;
|
|
|
|
List<Personne> personnes;
|
|
|
|
List<Description> descriptions;
|
|
|
|
List<Objet> objets;
|
|
|
|
List<Connaissance> connaissances;
|
|
|
|
|
|
|
|
public Lieu(
|
|
|
|
String nom,
|
|
|
|
Condition deposable,
|
|
|
|
Condition depart,
|
|
|
|
Condition fin,
|
|
|
|
List<Personne> personnes,
|
|
|
|
List<Description> descriptions,
|
|
|
|
List<Objet> objets,
|
|
|
|
List<Connaissance> connaissances) {
|
|
|
|
this.nom = nom;
|
|
|
|
this.deposable = deposable;
|
|
|
|
this.depart = depart;
|
|
|
|
this.fin = fin;
|
|
|
|
this.personnes = personnes;
|
|
|
|
this.descriptions = descriptions;
|
|
|
|
this.objets = objets;
|
|
|
|
this.connaissances = connaissances;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return nom;
|
|
|
|
}
|
2022-01-18 18:49:37 +00:00
|
|
|
|
|
|
|
public static Lieu search(List<Lieu> list, String name) {
|
|
|
|
return list.stream().filter(o -> o.nom.equals(name)).findFirst()
|
|
|
|
.orElseThrow(() -> new IllegalArgumentException("No data found"));
|
|
|
|
}
|
2021-12-09 17:54:08 +00:00
|
|
|
}
|