public S execute(List<S> solutionList) {
    if (null == solutionList) {
      throw new JMetalException("The solution list is null") ;
    } else if (solutionList.isEmpty()) {
      throw new JMetalException("The solution list is empty") ;
    }

    int bestSolution = 0 ;
    for (int i = 1; i < solutionList.size(); i++) {
      if (comparator.compare(solutionList.get(i), solutionList.get(bestSolution)) < 0) {
        bestSolution = i;
      }
    }

    return solutionList.get(bestSolution) ;
  }
public S execute ( List < S > solutionList ) { if ( null == solutionList ) { throw new JMetalException ( "The solution list is null" ) ; } else if ( solutionList . isEmpty ( ) ) { throw new JMetalException ( "The solution list is empty" ) ; } int bestSolution = 0 ; for ( int i = 1 ; i < solutionList . size ( ) ; i ++ ) { if ( comparator . compare ( solutionList . get ( i ) , solutionList . get ( bestSolution ) ) < 0 ) { bestSolution = i ; } } return solutionList . get ( bestSolution ) ; }
Execute() method