MCPcopy Create free account
hub / github.com/antlr/codebuff / removeAll

Method removeAll

corpus/java/training/guava/collect/Iterables.java:137–142  ·  view source on GitHub ↗

Removes, from an iterable, every element that belongs to the provided collection. This method calls Collection#removeAll if iterable is a collection, and Iterators#removeAll otherwise. @param removeFrom the iterable to (potentially) remove elements from @param elementsTo

(Iterable<?> removeFrom, Collection<?> elementsToRemove)

Source from the content-addressed store, hash-verified

135 * @return {@code true} if any element was removed from {@code iterable}
136 */
137 @CanIgnoreReturnValue
138 public static boolean removeAll(Iterable<?> removeFrom, Collection<?> elementsToRemove) {
139 return (removeFrom instanceof Collection)
140 ? ((Collection<?>) removeFrom).removeAll(checkNotNull(elementsToRemove))
141 : Iterators.removeAll(removeFrom.iterator(), elementsToRemove);
142 }
143
144 /**
145 * Removes, from an iterable, every element that does not belong to the

Callers

nothing calls this directly

Calls 4

removeAllMethod · 0.95
removeAllMethod · 0.65
iteratorMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected