Well, it could be recoded like this:

return !(o1.intValue() % 2 == 0 ^ o2.intValue() % 2 == 0);

which is not really clearer but it is fewer chars..

Gary


On Mon, Mar 18, 2013 at 1:25 PM, Gary Gregory <[email protected]>wrote:

> Sure, makes sense.
>
> Gary
>
>
> On Mon, Mar 18, 2013 at 1:22 PM, Simone Tripodi 
> <[email protected]>wrote:
>
>> Salut Gary,
>>
>> > +                if (o1.intValue() % 2 == 0 ^ o2.intValue() % 2 == 0) {
>> > +                    return false;
>> > +                } else {
>> > +                    return true;
>> > +                }
>>
>> FWIW, you don't need the `else` here.
>>
>> my 2 cents,
>> -Simo
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> --
> E-Mail: [email protected] | [email protected]
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: [email protected] | [email protected]
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to