Sort the list in descending order using this algorithm.

@param <E> the type of elements in this list.

@param list the list that we want to sort
546022
public static <E extends Comparable<E>> void sortDescending(List<E> list) {
        while(!Sort.isReverseSorted(list)) {
            FYShuffle.shuffle(list);
        }
    }
10199
public static <T extends Comparable<? super T>> List<T> sort(final List<T> list) {
        Validate.notNull(list, "Cannot execute list sort: list is null");
        final Object[] a = list.toArray();
        Arrays.sort(a);
        
        return fillNewList(a, list.getClass());
    }
935272
public static <T> List<T> sortByProperty(List<T> list, String property) {
		return sort(list, new PropertyComparator<>(property));
	}
767679
public static <T> void rsort (List<T> a, Comparator<? super T> comp)
    {
        sort(a, Collections.reverseOrder(comp));
    }
655860
public void sort(IndexedSortable s, int p, int r) {
    sort(s, p, r, null);
  }
1368527
public static <E extends Comparable<E>> void sortDescending(E[] intArray) {
        Merge.sort(intArray, 0, intArray.length-1, true);
    }
850405
public static <E extends Comparable<E>> void sort(E[] intArray) {
        Quicksort.sort(intArray, 0, intArray.length - 1 , false);
    }
537558
public void sortReverse(final Comparator<T> comparator) {
    this.sort(comparator);
    for (int i = 0; i < this.size / 2; i++) {
      final T temp = this.elements[i];
      this.elements[i] = this.elements[this.size - i - 1];
      this.elements[this.size - i - 1] = temp;
    }
  }
1294472
public void setList(List<T> list) {
        dataProvider.getList().clear();
        if (list != null) {
            for (T t : list) {
                dataProvider.getList().add(t);
            }
        }

        // Do a first-time sort based on which column was set in
        // setInitialSortColumn()
        if (initialSortColumn != null) {
            Collections.sort(dataProvider.getList(), new Comparator<T>() {

                @Override
                public int compare(T o1, T o2) {
                    return (defaultSortOrderMap.get(initialSortColumn) ? 1 : -1)
                            * comparators.get(initialSortColumn)
                            .compare(o1, o2);
                }

            });
            // Might as well get the little arrow on the header to make it
            // official
            getColumnSortList().push(
                    new ColumnSortList.ColumnSortInfo(initialSortColumn, defaultSortOrderMap
                            .get(initialSortColumn)));
            currentlySortedColumn = initialSortColumn;
        }
    }
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)   
	}
11821
public static <E> void shuffle(List<E> list) {
        int swapPlace = -1;
        
        for(int i = 0; i < list.size(); i++) { 
            swapPlace = (int) (Math.random() * (list.size() - 1));
            TrivialSwap.swap(list, i, swapPlace);
        }
	}
89542
public static <T extends Comparable<? super T>> void sort(List<T> list) {
		if (useQuickSort) QuickSort.sort(list);
		else              Collections.sort(list);
	}
37283
public void sort() {
        if (!sorted) {
            sort(heap, Math.min(k,n));
            sorted = true;
        }
    }
564932
public static <E extends Comparable<E>> void sort(E[] array) {
        int minIndex = 0;
        for(int i = 0; i < array.length; i++) {
            minIndex = i;
            
            for(int j = minIndex; j < array.length; j++) {
                if(array[j].compareTo(array[minIndex]) < 0) {
                    minIndex = j;
                }
            }
            TrivialSwap.swap(array, i, minIndex);
        }
    }
350057
public static <T> void sortReverse(List<T> list, Comparator<? super T> c) {
		Collections.sort(list, Collections.reverseOrder(c));
	}
1000122
public void apply(List items) {
        //If the list is empty avoid sorting and adding headers.
        int size = items.size();
        if (size > 0) {
            //sort beforehand
            if (comparator != null) {
                Collections.sort(items, comparator);
            }

            //we have to get the list size each time, as we will add the headers to it
            for (int i = -1; i < size; i++) {
                HeaderItem headerItem;
                if (i == -1) {
                    headerItem = groupingFunction.group(null, (Item) items.get(i + 1), i);
                } else if (i == size - 1) {
                    headerItem = groupingFunction.group((Item) items.get(i), null, i);
                } else {
                    headerItem = groupingFunction.group((Item) items.get(i), (Item) items.get(i + 1), i);
                }

                if (headerItem != null) {
                    items.add(i + 1, headerItem);
                    i = i + 1;
                    size = size + 1;
                }
            }
        }

        /**
         * set the sorted list to the modelAdapter if provided
         */
        if (modelAdapter != null) {
            modelAdapter.set(items);
        }
    }
634485
public static void removeFromList(List<String> list, String value) {
        int foundIndex = -1;
        int i = 0;
        for (String id : list) {
            if (id.equalsIgnoreCase(value)) {
                foundIndex = i;
                break;
            }
            i++;
        }
        if (foundIndex != -1) {
            list.remove(foundIndex);
        }
    }