List of utility methods to do List Sort
void | sort(List list) sort if (comparator == null) { comparator = new Comparator() { public int compare(Object o1, Object o2) { return o1.toString().compareToIgnoreCase(o2.toString()); }; Collections.sort(list, comparator); ... |
void | sort(List list, Comparator comparator) Sorts a list, if it exists. if (list == null || list.isEmpty()) { return; Collections.sort(list, comparator); |
int | sort(List> list1, List> list2) sort return list2.size() - list1.size();
|
List | sort(List sort return sort(list, null);
|
List | sort(List sort Collections.sort(source, new Comparator<E>() { @Override public int compare(E o1, E o2) { return o1.ordinal() - o2.ordinal(); }); return source; |
void | sort(List
Sort outer list by using first element of inner list Collections.sort(listOfClassDataList, new Comparator<List<T>>() { @Override public int compare(List<T> o1, List<T> o2) { if (o1 == null && o2 == null) { return 0; if (o1 == null && o2 != null) { return -1; ... |
void | sort(List
sort Map<String, List<T>> map = new TreeMap<String, List<T>>(); for (List<T> list : lists) { Collections.sort(list); StringBuilder builder = new StringBuilder(); for (T item : list) { builder.append(item.toString()); map.put(builder.toString(), list); ... |
List | sort(List sort Collections.sort(lists);
return lists;
|
void | sort(List sort |
List | sort(List sort if (list != null && list.size() > 0) { Collections.sort((List) list); return list; |