Java List Reverse reverseSort(final List lines)

Here you can find the source of reverseSort(final List lines)

Description

reverse Sort

License

Open Source License

Declaration

public static final void reverseSort(final List<String> lines) 

Method Source Code


//package com.java2s;

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

public class Main {
    public static final Comparator<String> REVERSE_ORDER = new Comparator<String>() {
        @Override//  w ww .  ja va 2  s .  c o m
        public int compare(final String o1, final String o2) {
            return o2.compareTo(o1);
        }
    };

    public static final void reverseSort(final List<String> lines) {
        Collections.sort(lines, REVERSE_ORDER);
    }
}

Related

  1. reverseListShallowCopy(List list)
  2. reverseOrder(List list)
  3. reversePath(List pathParts)
  4. reversePermutation(final List permutation)
  5. reversePermutation(T[] arr, List p)
  6. reverseUseList(int[] values)
  7. reverseVector(List vector)
  8. sortListBySublistSizeThenHead(List> list, boolean reverseOrder)
  9. sortReverse(List list)