MCPcopy Index your code
hub / github.com/apache/groovy / removeAll

Method removeAll

src/main/java/groovy/util/ObservableSet.java:383–404  ·  view source on GitHub ↗

{@inheritDoc}

(Collection<?> c)

Source from the content-addressed store, hash-verified

381
382 /** {@inheritDoc} */
383 @Override
384 public boolean removeAll(Collection<?> c) {
385 if (c == null) {
386 return false;
387 }
388
389 List values = new ArrayList();
390 for (Object element : c) {
391 if (delegate.contains(element)) {
392 values.add(element);
393 }
394 }
395
396 int oldSize = size();
397 boolean success = delegate.removeAll(c);
398 if (success && !values.isEmpty()) {
399 fireMultiElementRemovedEvent(values);
400 fireSizeChangedEvent(oldSize, size());
401 }
402
403 return success;
404 }
405
406 /** {@inheritDoc} */
407 @Override

Callers

nothing calls this directly

Calls 6

sizeMethod · 0.95
fireSizeChangedEventMethod · 0.95
addMethod · 0.65
containsMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected