1 /*
2 * Copyright (c) 2001, 2002 The XDoclet team
3 * All rights reserved.
4 */
5 package xdoclet.util.predicates;
6
7 import org.apache.commons.collections.Predicate;
8
9 import java.util.Iterator;
10
11 /***
12 * Logical and between one or more predicates.
13 *
14 * @author <a href="mailto:aslak.hellesoy at netcom.no">Aslak Hellesøy</a>
15 * @version $Revision: 1.3 $
16 */
17 public class And extends CompositePredicate {
18 public boolean evaluate(Object o) {
19 for (Iterator children = iterator(); children.hasNext();) {
20 Predicate child = (Predicate) children.next();
21
22 if (!child.evaluate(o)) {
23 return false;
24 }
25 }
26
27 return true;
28 }
29 }
This page was automatically generated by Maven