1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.condition;
17
18 import java.util.List;
19
20 import org.kuali.common.util.Assert;
21
22 import com.google.common.collect.ImmutableList;
23
24 public final class ConditionsCondition implements Condition {
25
26 public ConditionsCondition(List<Condition> conditions) {
27 Assert.noNulls(conditions);
28 this.conditions = ImmutableList.copyOf(conditions);
29 }
30
31 private final List<Condition> conditions;
32
33 @Override
34 public boolean isTrue() {
35 for (Condition condition : conditions) {
36 if (!condition.isTrue()) {
37 return false;
38 }
39 }
40 return true;
41 }
42
43 public List<Condition> getConditions() {
44 return conditions;
45 }
46
47 }