Adjusts this index table to contain the reverse sorted index order for
the given list
@param <T> the data type
@param list the list of objects
325488
public <T extends Comparable<T>> void sortR(List<T> list)
    {
        sort(list, getReverse(defaultComp));
    }
192941
public static <T> void reverseForEach(ArrayList<T> list, Procedure<? super T> procedure)
    {
        if (!list.isEmpty())
        {
            ArrayListIterate.forEach(list, list.size() - 1, 0, procedure);
        }
    }
1059847
public static <E extends Comparable<E>> int sortedIndex(final List<E> list, final E value) {
        int index = 0;
        for (E elem : list) {
            if (elem.compareTo(value) >= 0) {
                return index;
            }
            index += 1;
        }
        return -1;
    }
149058
public static <T> List<T> reverse(final List<T> list) {
		return Lists.reverse(list);
	}
772971
public synchronized void returnList(List list) {
        if (tc.isEntryEnabled())
            SibTr.entry(tc, "returnList");

        list.clear();
        listPool.add(list);

        if (tc.isEntryEnabled())
            SibTr.exit(tc, "returnList");
    }
395723
public void pollAllToList(List<T> retList) {
    while (head != null) {
      retList.add(head.element);
      head = head.after;
    }
    this.clear();
  }
441788
public void reverse(CollectListData data,
                        Object value) {
        CollectListData.MutableInt counter = data.map.get( value );
        if( (--counter.value) == 0 ) {
            data.map.remove( value );
        }
    }
306181
public static <T extends Comparable<? super T>> void sort(List<T> list) {
		sort(list, QuickSort.<T>naturalOrder()); // JAVA_8 replace with Comparator.naturalOrder() (and cleanup)   
	}
1223967
private void sort(List<ClassDoc> list) {
        List<ClassDoc> classes = new ArrayList<ClassDoc>();
        List<ClassDoc> interfaces = new ArrayList<ClassDoc>();
        for (int i = 0; i < list.size(); i++) {
            ClassDoc cd = list.get(i);
            if (cd.isClass()) {
                classes.add(cd);
            } else {
                interfaces.add(cd);
            }
        }
        list.clear();
        list.addAll(classes);
        list.addAll(interfaces);
    }
1217838
public static <T,W> List<T> listFirst(List<Pair<T, W>> list) {
        ArrayList<T> ts = new ArrayList<T>();
        for (Pair<T, W> twPair : list) {
            ts.add(twPair.getFirst());
        }
        return ts;
    }
408804
private List<T> records(int index, List<T> records, boolean reverse){
        this.index = index;
        if(reverse)
            Collections.reverse(records);
        firstRow = records.get(0);
        lastRow = records.get(records.size()-1);
        return records;
    }
1220206
public static <E, T extends E> void add(List<E> list, int index, T item){
        if(index<list.size())
            list.add(index, item);
        else
            list.add(item);
    }
478557
public void setVertexOrder(List<String> vertex_list)
	{
	    if (!vertex_list.containsAll(getGraph().getVertices())) 
	        throw new IllegalArgumentException("Supplied list must include " +
	        		"all vertices of the graph");
	    this.vertex_ordered_list = vertex_list;
	}
931009
public static <E> int lastIndexOf(final List<E> list, final E value) {
        return list.lastIndexOf(value);
    }
38267
static <T extends Comparable<T>> void bucketSort(final List<T> c) {
        if (N.isNullOrEmpty(c)) {
            return;
        }

        bucketSort(c, 0, c.size());
    }
961461
public static <T> void sort(List<T> list, Comparator<? super T> comparator) {
		if (list instanceof RandomAccess) {
			quicksort(list, comparator);
		} else {
			List<T> copy = new ArrayList<>(list);
			quicksort(copy, comparator);
			list.clear();
			list.addAll(copy);
		}
	}
1156431
public static <T extends Comparable<? super T>> void sort (List<T> a)
    {
        sort(a, new Comparator<T>() {
            public int compare (T o1, T o2) {
                if (o1 == o2) { // catches null == null
                    return 0;
                } else if (o1 == null) {
                    return 1;
                } else if (o2 == null) {
                    return -1;
                }
                return o1.compareTo(o2); // null-free
            }
        });
    }