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

Method retainAllImpl

output/java_guava/1.4.17/Multisets.java:927–934  ·  view source on GitHub ↗

An implementation of Multiset#retainAll.

(Multiset<?> self, Collection<?> elementsToRetain)

Source from the content-addressed store, hash-verified

925 */
926
927 static boolean retainAllImpl(Multiset<?> self, Collection<?> elementsToRetain) {
928 checkNotNull(elementsToRetain);
929 Collection<?> collection =
930 (elementsToRetain instanceof Multiset)
931 ? ((Multiset<?>) elementsToRetain).elementSet()
932 : elementsToRetain;
933 return self.elementSet().retainAll(collection);
934 }
935
936 /**
937 * An implementation of {@link Multiset#setCount(Object, int)}.

Callers 2

standardRetainAllMethod · 0.95
retainAllMethod · 0.95

Calls 3

elementSetMethod · 0.65
retainAllMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected