code: private void sortList(ArrayList candidateList) {
      java.util.Collections.sort(candidateList, new java.util.Comparator() {
        public int compare(Object o1, Object o2) {
          double scoreT = ( (TagLink.Candidates) o1).getScore();
          double scoreU = ( (TagLink.Candidates) o2).getScore();
          if(scoreU > scoreT){
  			return 1;
  		}
          if(scoreU > scoreT){
  			return -1;
  		}
  		return 0;
        }
      }
      );
    }
docs: sortList sort a candidate list by its scores.
  
  @param candidateList ArrayList