On Dec 17 2010, at 17:02 , Rémi Forax wrote:
> On 12/18/2010 01:31 AM, Mike Duigou wrote:
>> I've posted a webrev for review at
>>
>> http://cr.openjdk.java.net/~mduigou/6728865.0/webrev/
>>
>> which improves the behaviour of Collections.disjoint() when the collection
>> c1 is not a Set and is
I have updated the webrev for CR 6728865 with Rémi's feedback. The new webrev
is at:
http://cr.openjdk.java.net/~mduigou/6728865.1/webrev/
The size() comparisons are now done only when both c1 and c2 are not sets and I
have removed the isEmpty() micro-optimization.
Mike
Hi, I think you could code shorter:
Collection iterate;
Collection contains;
if (c2 instanceof Set) {
// C2 or both are sets.
iterate = c1;
contains = c2;
} else if (c1 instanceof Set) {
// c1 is a Set, c2 is a mere