@Test public void testEqualHighestCountElement() { list.add("T1"); list.add("T2"); list.add("T3"); assertEquals("T1", CollectionUtils.highestCountElement(list)); }
public static <T> T highestCountElement(final List<T> list) throws NoSuchElementException { final Multiset<T> plateSet = HashMultiset.create(); plateSet.addAll(list); return Multisets.copyHighestCountFirst(plateSet).iterator().next(); }
CollectionUtils { public static <T> T highestCountElement(final List<T> list) throws NoSuchElementException { final Multiset<T> plateSet = HashMultiset.create(); plateSet.addAll(list); return Multisets.copyHighestCountFirst(plateSet).iterator().next(); } }
CollectionUtils { public static <T> T highestCountElement(final List<T> list) throws NoSuchElementException { final Multiset<T> plateSet = HashMultiset.create(); plateSet.addAll(list); return Multisets.copyHighestCountFirst(plateSet).iterator().next(); } private  CollectionUtils(); }
CollectionUtils { public static <T> T highestCountElement(final List<T> list) throws NoSuchElementException { final Multiset<T> plateSet = HashMultiset.create(); plateSet.addAll(list); return Multisets.copyHighestCountFirst(plateSet).iterator().next(); } private  CollectionUtils(); static T highestCountElement(final List<T> list); }
CollectionUtils { public static <T> T highestCountElement(final List<T> list) throws NoSuchElementException { final Multiset<T> plateSet = HashMultiset.create(); plateSet.addAll(list); return Multisets.copyHighestCountFirst(plateSet).iterator().next(); } private  CollectionUtils(); static T highestCountElement(final List<T> list);  }