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

Method copyHighestCountFirst

output/java_guava/1.4.17/Multisets.java:1152–1156  ·  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

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

Callers

nothing calls this directly

Calls 3

copyFromEntriesMethod · 0.95
entrySetMethod · 0.65
immutableSortedCopyMethod · 0.45

Tested by

no test coverage detected