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

Method copyHighestCountFirst

output/java_guava/1.4.19/Multisets.java:1151–1155  ·  view source on GitHub ↗

Returns a copy of multiset as an ImmutableMultiset whose iteration order is highest count first, with ties broken by the iteration order of the original multiset. @since 11.0

(Multiset<E> multiset)

Source from the content-addressed store, hash-verified

1149 */
1150
1151 @Beta
1152 public static <E> ImmutableMultiset<E> copyHighestCountFirst(Multiset<E> multiset) {
1153 List<Entry<E>> sortedEntries = Multisets.DECREASING_COUNT_ORDERING.immutableSortedCopy(multiset.entrySet());
1154 return ImmutableMultiset.copyFromEntries(sortedEntries);
1155 }
1156}

Callers

nothing calls this directly

Calls 3

copyFromEntriesMethod · 0.95
entrySetMethod · 0.65
immutableSortedCopyMethod · 0.45

Tested by

no test coverage detected