1 18 package org.apache.tools.ant.taskdefs.condition; 19 20 import org.apache.tools.ant.BuildException; 21 22 import java.util.Enumeration ; 23 24 28 public class Xor extends ConditionBase implements Condition { 29 30 36 public boolean eval() throws BuildException { 37 Enumeration e = getConditions(); 38 boolean state = false; 40 while (e.hasMoreElements()) { 41 Condition c = (Condition) e.nextElement(); 42 state ^= c.eval(); 44 } 45 return state; 46 } 47 48 } 49 | Popular Tags |