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

Method retainAll

output/java_guava/1.4.18/Iterators.java:270–273  ·  view source on GitHub ↗

Traverses an iterator and removes every element that does not belong to the provided collection. The iterator will be left exhausted: its hasNext() method will return false. @param removeFrom the iterator to (potentially) remove elements from @param elementsToRetain the elements to

(Iterator<?> removeFrom, Collection<?> elementsToRetain)

Source from the content-addressed store, hash-verified

268 */
269
270 @CanIgnoreReturnValue
271 public static boolean retainAll(Iterator<?> removeFrom, Collection<?> elementsToRetain) {
272 return removeIf(removeFrom, not(in(elementsToRetain)));
273 }
274
275 /**
276 * Determines whether two iterators contain equal elements in the same order.

Callers 3

retainAllMethod · 0.95
retainAllMethod · 0.95
standardRetainAllMethod · 0.95

Calls 3

removeIfMethod · 0.95
notMethod · 0.45
inMethod · 0.45

Tested by

no test coverage detected