equal
deleted
inserted
replaced
164 * or if the specified collection is null |
164 * or if the specified collection is null |
165 * @see #remove(Object) |
165 * @see #remove(Object) |
166 * @see #contains(Object) |
166 * @see #contains(Object) |
167 */ |
167 */ |
168 public boolean removeAll(Collection<?> c) { |
168 public boolean removeAll(Collection<?> c) { |
|
169 Objects.requireNonNull(c); |
169 boolean modified = false; |
170 boolean modified = false; |
170 |
171 |
171 if (size() > c.size()) { |
172 if (size() > c.size()) { |
172 for (Iterator<?> i = c.iterator(); i.hasNext(); ) |
173 for (Iterator<?> i = c.iterator(); i.hasNext(); ) |
173 modified |= remove(i.next()); |
174 modified |= remove(i.next()); |