125 |
{ |
{ |
126 |
int oldsize = size(); |
int oldsize = size(); |
127 |
int count = c.size(); |
int count = c.size(); |
|
Iterator<E> i; |
|
128 |
if (oldsize < count) |
if (oldsize < count) |
129 |
{ |
{ |
130 |
for (i = iterator(), count = oldsize; count > 0; count--) |
for (Iterator<E> i = iterator(), count = oldsize; count > 0; count--) |
131 |
if (c.contains(i.next())) |
{ |
132 |
i.remove(); |
if (c.contains(i.next())) |
133 |
|
i.remove(); |
134 |
|
} |
135 |
} |
} |
136 |
else |
else |
137 |
for (i = c.iterator(); count > 0; count--) |
{ |
138 |
remove(i.next()); |
for (Iterator<?> i = c.iterator(); count > 0; count--) |
139 |
|
remove(i.next()); |
140 |
|
} |
141 |
return oldsize != size(); |
return oldsize != size(); |
142 |
} |
} |
|
|
|
143 |
} |
} |