public class IntegerAnswerFormat extends AnswerFormat
If you specify maximum or minimum values and the user enters a value outside the specified range,
the IntegerQuestionBody
does not allow navigation
until the participant provides a value that is within the valid range.
AnswerFormat.ChoiceAnswerStyle, AnswerFormat.DateAnswerStyle, AnswerFormat.NumberFormattingStyle, AnswerFormat.QuestionType, AnswerFormat.Type
Constructor and Description |
---|
IntegerAnswerFormat(int minValue,
int maxValue)
Creates an integer answer format with the specified min and max values.
|
Modifier and Type | Method and Description |
---|---|
int |
getMaxValue()
Returns the maximum allowed value for the question, 0 if no max
|
int |
getMinValue()
Returns the minimum allowed value for the question
|
AnswerFormat.QuestionType |
getQuestionType()
Returns the QuestionType for this answer format.
|
BodyAnswer |
validateAnswer(java.lang.String inputString) |
public IntegerAnswerFormat(int minValue, int maxValue)
minValue
- minimum allowed valuemaxValue
- maximum allowed value, 0 if no maxpublic AnswerFormat.QuestionType getQuestionType()
AnswerFormat
getQuestionType
in class AnswerFormat
public int getMaxValue()
public int getMinValue()
public BodyAnswer validateAnswer(java.lang.String inputString)