public abstract class StudentResponseValue<P extends AnswerValuePart> extends AnswerValue<P>
Constructor and Description |
---|
StudentResponseValue() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isAllowedEvalType(AnswerEvalType evalType)
Returns whether an evaluation type is allowed for responses to this problem.
|
protected void |
validatePartsCount()
Validates whether count of value parts in this answer value match the
expected count for this type of answer value.
|
protected void |
validatePartsCount(java.util.List<P> valueParts)
Validates whether specified list contains exactly the correct number of value parts
expected for this type of answer value.
|
equals, getValuePart, getValuePart, getValueParts, getValuePartsCount, getValuePartType, getValuePartType, getValuePartValue, getValuePartValue, hashCode, partsToList, setValueParts, setValueParts, toString, toViewString
protected void validatePartsCount(java.util.List<P> valueParts) throws java.lang.IllegalArgumentException
AnswerValue
validatePartsCount
in class AnswerValue<P extends AnswerValuePart>
valueParts
- List of value partsjava.lang.IllegalArgumentException
- if the number of value parts found was unexpectedAnswerableProblemAttributes.getAnswerValuePartsCount()
,
AnswerableProblemAttributes.getResponseValuePartsCount()
protected void validatePartsCount() throws java.lang.IllegalArgumentException
AnswerValue
validatePartsCount
in class AnswerValue<P extends AnswerValuePart>
java.lang.IllegalArgumentException
- if the number of value parts found was unexpectedAnswerableProblemAttributes.getAnswerValuePartsCount()
,
AnswerableProblemAttributes.getResponseValuePartsCount()
protected boolean isAllowedEvalType(AnswerEvalType evalType)
AnswerValue
isAllowedEvalType
in class AnswerValue<P extends AnswerValuePart>
evalType
- Evaluation type to checkAnswerEvalType
,
AnswerableProblem.registerProblemTypeAttributes(String, String, String, String, int, int, int, List, List)