Java List Sort Sort(Collection list)

Here you can find the source of Sort(Collection list)

Description

Convenience methods that makes it easier to sort a collection

License

Open Source License

Parameter

Parameter Description
list Collection to sort

Return

Sorted list

Declaration

public static ArrayList<String> Sort(Collection<String> list) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;

public class Main {
    /** Convenience methods that makes it easier to sort a collection
     */*from  www  .j  a v a  2  s  . c o  m*/
     * @param list Collection to sort
     * @return Sorted list
     */
    public static ArrayList<String> Sort(Collection<String> list) {
        ArrayList<String> newList = new ArrayList<String>(list);
        Collections.sort(newList);
        return newList;
    }
}

Related

  1. removeSortColumns(List selectColumns, List sorts, List ascending)
  2. searchSorted(List a, double v)
  3. setToSortedList(final Set set, final Comparator comparator)
  4. sort( S list)
  5. sort(Collection list)
  6. sort(Collection list)
  7. sort(final List list)
  8. sort(List list)
  9. sort(List list)