@Test public void test_sortSimpleName() throws Exception { List<String> list = new ArrayList<String>(); list.add("aaa.z"); list.add("b"); list.add(null); list.add("zzz.a"); list.add("c"); list.add(null); List<String> sorted = CollectionUtils.sortSimpleName(list); assertNull(sorted.get(0)); assertNull(sorted.get(1)); }
public static List<String> sortSimpleName(List<String> list) { if (list != null && list.size() > 0) { list.sort(SIMPLE_NAME_COMPARATOR); } return list; }
CollectionUtils { public static List<String> sortSimpleName(List<String> list) { if (list != null && list.size() > 0) { list.sort(SIMPLE_NAME_COMPARATOR); } return list; } }
CollectionUtils { public static List<String> sortSimpleName(List<String> list) { if (list != null && list.size() > 0) { list.sort(SIMPLE_NAME_COMPARATOR); } return list; } private  CollectionUtils(); }
CollectionUtils { public static List<String> sortSimpleName(List<String> list) { if (list != null && list.size() > 0) { list.sort(SIMPLE_NAME_COMPARATOR); } 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 { public static List<String> sortSimpleName(List<String> list) { if (list != null && list.size() > 0) { list.sort(SIMPLE_NAME_COMPARATOR); } 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);  }