Package nz.org.riskscape.wizard
Class BaseQuestionSet
java.lang.Object
nz.org.riskscape.wizard.BaseQuestionSet
- All Implemented Interfaces:
QuestionSet
- Direct Known Subclasses:
DefaultQuestionSet2
,EmptyQuestionSet
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final String
protected final String
protected final Survey
Fields inherited from interface nz.org.riskscape.wizard.QuestionSet
FINAL_QUESTION, SKIP, UNASSIGNED
-
Constructor Summary
ConstructorDescriptionBaseQuestionSet
(String name, String discriminator, Survey survey) Construct a question set where the name is used for the i18n look up and the id is set as the name plus an integer disriminator, e.g.BaseQuestionSet
(String id, Survey survey) Construct a question set where the id is used for the i18n look up. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getDescription
(Locale locale) A human-friendly description for this QuestionSetgetId()
getName()
A human-friendly title for this QuestionSetint
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.wizard.QuestionSet
getPhase, getPipelineChange, getQuestions
-
Field Details
-
name
-
discriminator
-
id
-
survey
-
-
Constructor Details
-
BaseQuestionSet
Construct a question set where the id is used for the i18n look up.
-
BaseQuestionSet
Construct a question set where the name is used for the i18n look up and the id is set as the name plus an integer disriminator, e.g.
{name: reports, discriminator: 2}
would give an id ofreports-2
-
-
Method Details
-
getDescription
Description copied from interface:QuestionSet
A human-friendly description for this QuestionSet
- Specified by:
getDescription
in interfaceQuestionSet
-
getTitle
Description copied from interface:QuestionSet
A human-friendly title for this QuestionSet
- Specified by:
getTitle
in interfaceQuestionSet
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getName
- Specified by:
getName
in interfaceQuestionSet
-
getId
- Specified by:
getId
in interfaceQuestionSet
- Returns:
- a String that uniquely identifies this QuestionSet TODO this might become a name and end up being a weak identifier, as the name is probably only unique within the context of a survey
-
getSurvey
- Specified by:
getSurvey
in interfaceQuestionSet
- Returns:
- the survey to which this set belongs
-