private <T extends Comparable<T>>List<T> sorted(Collection<T> col){
  List<T> list=new ArrayList<>(col);
  Collections.sort(list);
  return list;
}

private < T extends Comparable < T > > List < T > sorted ( Collection < T > col ) { List < T > list = new ArrayList < > ( col ) ; Collections . sort ( list ) ; return list ; }
convert collection into sorted list .
