public class DecimalAnswerFormat extends AnswerFormat
If you specify maximum or minimum values and the user enters a value outside the specified range, the DecimalQuestionBody 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 |
---|
DecimalAnswerFormat(float minValue,
float maxValue)
Creates an answer format with the specified min and max values
|
Modifier and Type | Method and Description |
---|---|
float |
getMaxValue()
Returns the max value, or 0f for no maximum
|
float |
getMinValue()
Returns the min value
|
AnswerFormat.QuestionType |
getQuestionType()
Returns the QuestionType for this answer format.
|
BodyAnswer |
validateAnswer(java.lang.String inputString) |
public DecimalAnswerFormat(float minValue, float maxValue)
minValue
- the minimum allowed valuemaxValue
- the maximum allowed value, or 0f for unlimitedpublic AnswerFormat.QuestionType getQuestionType()
AnswerFormat
getQuestionType
in class AnswerFormat
public float getMinValue()
public float getMaxValue()
public BodyAnswer validateAnswer(java.lang.String inputString)