@Test public void testSort() throws Exception { List<Integer> list = new ArrayList<Integer>(); list.add(100); list.add(10); list.add(20); List<Integer> expected = new ArrayList<Integer>(); expected.add(10); expected.add(20); expected.add(100); assertEquals(expected, CollectionUtils.sort(list)); }
@SuppressWarnings({"unchecked", "rawtypes"}) public static <T> List<T> sort(List<T> list) { if (list != null && !list.isEmpty()) { Collections.sort((List) list); } return list; }
CollectionUtils { @SuppressWarnings({"unchecked", "rawtypes"}) public static <T> List<T> sort(List<T> list) { if (list != null && !list.isEmpty()) { Collections.sort((List) list); } return list; } }
CollectionUtils { @SuppressWarnings({"unchecked", "rawtypes"}) public static <T> List<T> sort(List<T> list) { if (list != null && !list.isEmpty()) { Collections.sort((List) list); } return list; } private  CollectionUtils(); }
CollectionUtils { @SuppressWarnings({"unchecked", "rawtypes"}) public static <T> List<T> sort(List<T> list) { if (list != null && !list.isEmpty()) { Collections.sort((List) list); } return list; } private  CollectionUtils(); @SuppressWarnings({"unchecked", "rawtypes"}) static List<T> sort(List<T> list); static List<String> sortSimpleName(List<String> list); static Map<String, Map<String, String>> splitAll(Map<String, List<String>> list, String separator); static Map<String, List<String>> joinAll(Map<String, Map<String, String>> map, String separator); static Map<String, String> split(List<String> list, String separator); static List<String> join(Map<String, String> map, String separator); static String join(List<String> list, String separator); static boolean mapEquals(Map<?, ?> map1, Map<?, ?> map2); static Map<String, String> toStringMap(String... pairs); @SuppressWarnings("unchecked") static Map<K, V> toMap(Object... pairs); static boolean isEmpty(Collection<?> collection); static boolean isNotEmpty(Collection<?> collection); }
CollectionUtils { @SuppressWarnings({"unchecked", "rawtypes"}) public static <T> List<T> sort(List<T> list) { if (list != null && !list.isEmpty()) { Collections.sort((List) list); } return list; } private  CollectionUtils(); @SuppressWarnings({"unchecked", "rawtypes"}) static List<T> sort(List<T> list); static List<String> sortSimpleName(List<String> list); static Map<String, Map<String, String>> splitAll(Map<String, List<String>> list, String separator); static Map<String, List<String>> joinAll(Map<String, Map<String, String>> map, String separator); static Map<String, String> split(List<String> list, String separator); static List<String> join(Map<String, String> map, String separator); static String join(List<String> list, String separator); static boolean mapEquals(Map<?, ?> map1, Map<?, ?> map2); static Map<String, String> toStringMap(String... pairs); @SuppressWarnings("unchecked") static Map<K, V> toMap(Object... pairs); static boolean isEmpty(Collection<?> collection); static boolean isNotEmpty(Collection<?> collection);  }