2021-12-01 19:55:46 +00:00
|
|
|
import java.util.List;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
2021-11-30 22:02:55 +00:00
|
|
|
public class Condition {
|
|
|
|
|
2021-12-01 08:09:27 +00:00
|
|
|
List<ConditionEt> conditionEts;
|
2021-11-30 22:02:55 +00:00
|
|
|
|
2021-12-01 08:09:27 +00:00
|
|
|
public Condition(
|
2021-12-01 19:55:46 +00:00
|
|
|
ConditionEt... conditionEts) {
|
|
|
|
this.conditionEts = new ArrayList<>();
|
|
|
|
for (ConditionEt c : conditionEts) {
|
|
|
|
this.conditionEts.add(c);
|
|
|
|
}
|
2021-11-30 22:02:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public Boolean evaluer() {
|
|
|
|
for (ConditionEt cond : conditionEts) {
|
|
|
|
if (cond.evaluer()) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|