Package nz.org.riskscape.wizard.survey2
Class PickQuestionSet
java.lang.Object
nz.org.riskscape.wizard.survey2.PickQuestionSet
Special parameter type used by surveys that is used to indicate a choice of question set. We can't use a QuestionSet
directly as there's no way to bind them without interrogating the Survey
, which complicates the binding
(and/or management of QuestionSets). So instead, we have a PickQuestionSet which gives us a special parameter type
that we can look for in our survey logic and a pointer to the question set that was chosen.
The class also has a field for setting the questionSet which can't be relied on as being there, but will be set in specific circumstances. It's a bit of a kludge but makes it nice and easy for passing it around and/or memoizing the question set.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
questionSetId
-
questionSet
-
-
Constructor Details
-
PickQuestionSet
public PickQuestionSet() -
PickQuestionSet
-
PickQuestionSet
-
-
Method Details
-
isSkip
public boolean isSkip()- Returns:
- true if the user's choice was to skip the question sets that were offered to them.
-
asChoice
- Returns:
- the QuestionSet as a Choice that can be presented in either the CLI or UI
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getQuestionSetId
-