List of utility methods to do List Reverse
void | reverseUseList(int[] values) reverse Use List List<Integer> list = new ArrayList<Integer>(); for (int object : values) { list.add(object); Collections.reverse(list); Integer[] integers = list.toArray(new Integer[0]); int i = 0; for (int value : integers) { ... |
List | reverseVector(List reverse Vector Collections.reverse(vector);
return vector;
|
void | sortListBySublistSizeThenHead(List
sort List By Sublist Size Then Head Collections.sort(list, new Comparator<List<T>>() { @Override public int compare(List<T> o1, List<T> o2) { int size1 = o1.size(), size2 = o2.size(); if (size1 == size2 && size1 > 0 && size2 > 0) return o1.get(0).compareTo(o2.get(0)); return size1 - size2; }); if (reverseOrder) Collections.reverse(list); |
void | sortReverse(List sort Reverse Collections.sort(list, Collections.reverseOrder()); |
void | sortReverseOrder(List sort Reverse Order Collections.sort(list, Collections.reverseOrder()); |
List | toReverse(List to Reverse List<T> ret = new ArrayList<>(list.size()); for (Iterator<T> itr = new LinkedList<>(list).descendingIterator(); itr.hasNext();) { T obj = itr.next(); ret.add(obj); return ret; |