Java List Reverse sortReverse(List list)

Here you can find the source of sortReverse(List list)

Description

sort Reverse

License

Apache License

Declaration

public static <T extends Comparable<? super T>> void sortReverse(List<T> list) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Collections;
import java.util.Comparator;

import java.util.List;

public class Main {

    public static <T extends Comparable<? super T>> void sortReverse(List<T> list) {
        Collections.sort(list, Collections.reverseOrder());
    }/*from w ww  .  j a v  a2s  .com*/

    public static <T> void sortReverse(List<T> list, Comparator<? super T> c) {
        Collections.sort(list, Collections.reverseOrder(c));
    }

    public static <T extends Comparable<? super T>> void sort(List<T> list) {
        Collections.sort(list);
    }

    public static <T> void sort(List<T> list, Comparator<? super T> c) {
        Collections.sort(list, c);
    }
}

Related

  1. reversePermutation(T[] arr, List p)
  2. reverseSort(final List lines)
  3. reverseUseList(int[] values)
  4. reverseVector(List vector)
  5. sortListBySublistSizeThenHead(List> list, boolean reverseOrder)
  6. sortReverseOrder(List list)
  7. toReverse(List list)