| 12345678910111213141516171819202122232425262728293031 |
- 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
- * <p>
- * 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));
- }
- }
|