public static class DynamicAnalysis.QuestionResponse extends Object implements IQuestionResponse
Constructor and Description |
---|
DynamicAnalysis.QuestionResponse(Survey s,
String quid,
int qpos)
QuestionResponse constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o) |
SurveyDatum |
getAnswer()
Convenience method for getting a single answer, if this question is marked exclusive (i.e., radio button).
|
List<SurveyDatum> |
getAnswers()
Convenience method for getting a list of answers, if the question is marked not exclusive (i.e., checkbox).
|
int |
getIndexSeen()
Gets the index at which the question in this question response was seen.
|
List<OptTuple> |
getOpts()
Gets the list of answers the respondent provided for this question.
|
Question |
getQuestion()
Gets the question associated with this IQuestionResponse
|
public DynamicAnalysis.QuestionResponse(Survey s, String quid, int qpos) throws SurveyException
s
- The survey this response refers to.quid
- The question id for this response.qpos
- The index of the position at which this questio appeared to the respondent.SurveyException
public Question getQuestion()
IQuestionResponse
getQuestion
in interface IQuestionResponse
public List<OptTuple> getOpts()
IQuestionResponse
getOpts
in interface IQuestionResponse
OptTuple
s, corresponding to answer data.public int getIndexSeen()
IQuestionResponse
getIndexSeen
in interface IQuestionResponse
public SurveyDatum getAnswer() throws SurveyException
IQuestionResponse
getAnswer
in interface IQuestionResponse
SurveyException
- if this question is not marked exclusive.public List<SurveyDatum> getAnswers() throws SurveyException
IQuestionResponse
getAnswers
in interface IQuestionResponse
SurveyException
- if this question is marked exclusive.public int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2015. All rights reserved.