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)
| 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 | } |
nothing calls this directly
no test coverage detected