1 | public class And extends ConditionBase implements Condition {↵ | | 1 | public class Or extends ConditionBase implements Condition {↵
|
|
2 | /**↵ | | 2 | /**↵
|
3 | * @return true if all the contained conditions evaluates to true↵ | | 3 | * @return true if any of the contained conditions evaluate to true↵
|
4 | * @exception BuildException if an error occurs↵ | | 4 | * @exception BuildException if an error occurs↵
|
5 | */↵ | | 5 | */↵
|
6 | public boolean eval() throws BuildException {↵ | | 6 | public boolean eval() throws BuildException {↵
|
7 | Enumeration e = getConditions();↵ | | 7 | Enumeration e = getConditions();↵
|
8 | while (e.hasMoreElements()) {↵ | | 8 | while (e.hasMoreElements()) {↵
|
9 | Condition c = (Condition) e.nextElement();↵ | | 9 | Condition c = (Condition) e.nextElement();↵
|
10 | if (!c.eval()) {↵ | | 10 | if (c.eval()) {↵
|
11 | return false;↵ | | 11 | return true;↵
|
12 | }↵ | | 12 | }↵
|
13 | }↵ | | 13 | }↵
|
14 | return true;↵ | | 14 | return false;↵
|
15 | | | 15 |
|