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

Method retainOccurrences

output/java_guava/1.4.17/Multisets.java:702–705  ·  view source on GitHub ↗

Modifies multisetToModify so that its count for an element e is at most multisetToRetain.count(e). To be precise, multisetToModify.count(e) is set to Math.min(multisetToModify.count(e), multisetToRetain.count(e)). This is similar to {@link #intersection(Mu

(Multiset<?> multisetToModify, Multiset<?> multisetToRetain)

Source from the content-addressed store, hash-verified

700 */
701
702 @CanIgnoreReturnValue
703 public static boolean retainOccurrences(Multiset<?> multisetToModify, Multiset<?> multisetToRetain) {
704 return retainOccurrencesImpl(multisetToModify, multisetToRetain);
705 }
706
707 /**
708 * Delegate implementation which cares about the element type.

Callers

nothing calls this directly

Calls 1

retainOccurrencesImplMethod · 0.95

Tested by

no test coverage detected