/** * 封装小题和选项 * * @param questions 包含试卷所有小题的Map * @param options 包含试卷所有选项的Map */ private void fixQuestionsAndOptions( Map<Integer, List<Question>> questions, Map<Integer, List<Option>> options) { for (Iterator<List<Question>> iterator = questions.values().iterator(); iterator.hasNext(); ) for (Iterator<Question> iterator2 = iterator.next().iterator(); iterator2.hasNext(); ) { Question question = iterator2.next(); question.setOptions(options.get(question.getQuestionId())); } }