1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
import java.util.*; |
334 |
|
if (m.put(x, x) == null) |
335 |
|
++sum; |
336 |
|
} |
337 |
+ |
/* // uncomment to avoid calling clear() |
338 |
+ |
for (int i = 0; i < len; ++i) { |
339 |
+ |
Object x = keys[i]; |
340 |
+ |
m.remove(x); |
341 |
+ |
} |
342 |
+ |
*/ |
343 |
|
m.clear(); |
344 |
|
sum += len - (quarter * 2); |
345 |
|
checkSum += sum ^ (sum << 12); |