public class BooleanAnswerFormat extends ChoiceAnswerFormat
ChoiceAnswerFormat
that provides a simple true/false single
choice question.
You may pass in the strings to display for true and false for the user, but the values will always be true/false.
AnswerFormat.ChoiceAnswerStyle, AnswerFormat.DateAnswerStyle, AnswerFormat.NumberFormattingStyle, AnswerFormat.QuestionType, AnswerFormat.Type
Constructor and Description |
---|
BooleanAnswerFormat(java.lang.String trueString,
java.lang.String falseString)
Constructs a single choice question with true/false values, using the specified strings to
represent those choices to the user.
|
Modifier and Type | Method and Description |
---|---|
AnswerFormat.QuestionType |
getQuestionType()
Returns a multiple choice or single choice question type, which will decide which
StepBody to use to display this question. |
getChoices
public BooleanAnswerFormat(java.lang.String trueString, java.lang.String falseString)
trueString
- a string representing true
("Yes", "True", "OK", etc)falseString
- a string representing false
("No", "False", etc)public AnswerFormat.QuestionType getQuestionType()
ChoiceAnswerFormat
StepBody
to use to display this question.getQuestionType
in class ChoiceAnswerFormat