package nju.seec.helper.vo.question; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NonNull; import nju.seec.helper.sys.bok.vo.QuestionVO; /** * @author xst *
* updated by cst */ @EqualsAndHashCode(callSuper = true) @Data public class ChoiceQuestionVO extends BaseQuestionVO { private String answer; public ChoiceQuestionVO(@NonNull QuestionVO questionVO, boolean withAnswer) { super(questionVO); if (withAnswer) { this.answer = questionVO.getAnswer(); this.analysis = questionVO.getAnalysis(); } } @Override public boolean pass(Object answer) { return this.answer.equals(String.valueOf(answer)); } }