Re: xor condition

2011-07-20 Thread Matt Benson
On Wed, Jul 20, 2011 at 5:44 AM, Jesse Glick wrote: > On 07/16/2011 08:59 PM, Matt Benson wrote: >> >> xor(true, false) == true >> xor(true, false, true) == false >> xor(true, false, true, false) == false >> >> Is this correct? > > Follows the usual semantics; cf.: > http://en.wikipedia.org/wiki/E

Re: xor condition

2011-07-20 Thread Jesse Glick
On 07/16/2011 08:59 PM, Matt Benson wrote: xor(true, false) == true xor(true, false, true) == false xor(true, false, true, false) == false Is this correct? Follows the usual semantics; cf.: http://en.wikipedia.org/wiki/Exclusive_or#Associativity_and_commutativity It would seem that semantic

Re: xor condition

2011-07-16 Thread Stefan Bodewig
On 2011-07-17, Matt Benson wrote: >> , >> | It only evaluates to true if an odd number of nested conditions are true. >> ` > So is this an accepted "kind of xor"? Accepted by the original author (Steve IIRC), silently accepted by all reviewers back then and in a way accepted as "that's w

Re: xor condition

2011-07-16 Thread Matt Benson
ntainer would be > required.  "exactlyOneOf" or something similar? I don't need it, personally, yet. Was working in Commons Lang, noticed the discrepancy between oacl.BooleanUtils.xor() and Ant's xor condition, and wanted to follow up. br, Matt > > Stefan > > --

Re: xor condition

2011-07-16 Thread Stefan Bodewig
On 2011-07-17, Matt Benson wrote: > Currently each nested condition is xor'd against the cumulative result, thus: > xor(true, false) == true > xor(true, false, true) == false > xor(true, false, true, false) == false > Is this correct? It would seem that semantically an xor over multiple > neste

xor condition

2011-07-16 Thread Matt Benson
Currently each nested condition is xor'd against the cumulative result, thus: xor(true, false) == true xor(true, false, true) == false xor(true, false, true, false) == false Is this correct? It would seem that semantically an xor over multiple nested conditions should mean that exactly one value