public List<CandidateAnswer> getTopNCandidateAnswer(int topN) {
        List<CandidateAnswer> topNcandidateAnswers = new ArrayList<>();
        List<CandidateAnswer> allCandidateAnswers = getAllCandidateAnswer();
        if (topN > allCandidateAnswers.size()) {
            topN = allCandidateAnswers.size();
        }
        for (int i = 0; i < topN; i++) {
            topNcandidateAnswers.add(allCandidateAnswers.get(i));
        }
        return topNcandidateAnswers;
    }
public List < CandidateAnswer > getTopNCandidateAnswer ( int topN ) { List < CandidateAnswer > topNcandidateAnswers = new ArrayList < > ( ) ; List < CandidateAnswer > allCandidateAnswers = getAllCandidateAnswer ( ) ; if ( topN > allCandidateAnswers . size ( ) ) { topN = allCandidateAnswers . size ( ) ; } for ( int i = 0 ; i < topN ; i ++ ) { topNcandidateAnswers . add ( allCandidateAnswers . get ( i ) ) ; } return topNcandidateAnswers ; }
获取topN候选答案

@param topN
@return topN候选答案