projet-genie-logiciel-systeme/runtime-workspace/fr.n7.game.examples/src-gen/Condition.java
2022-01-18 19:49:37 +01:00

20 lines
478 B
Java

import java.util.List;
public class Condition {
List<List<ConditionTest>> conditionsNormaleDisjonctive;
public Condition(List<List<ConditionTest>> conditions) {
this.conditionsNormaleDisjonctive = conditions;
}
public Boolean evaluer() {
return conditionsNormaleDisjonctive.stream()
.anyMatch(
conditionOU -> conditionOU.stream()
.allMatch(c -> c.evaluer()));
}
}