public class Interpreter extends Object
| Constructor and Description |
|---|
Interpreter(Survey survey)
Constructs an interpreter for a given survey.
|
| Modifier and Type | Method and Description |
|---|---|
void |
answer(Question q,
List<SurveyDatum> aList)
Answers question q with some list of answers.
|
Question |
getNextQuestion()
Returns the next question, according to the status of the interpreter.
|
SurveyResponse |
getResponse()
Returns an empty survey response.
|
static Map<Boolean,List<Block>> |
partitionBlocks(Survey survey)
Partitions the top-level blocks in the survey into those that are floating and those that are static.
|
boolean |
terminated()
Indicates whether we have reached a terminal node in the survey graph.
|
public Survey survey
public Interpreter(Survey survey)
survey - The survey we would like a respondent to take.public SurveyResponse getResponse() throws SurveyException
SurveyExceptionpublic void answer(Question q, List<SurveyDatum> aList) throws SurveyException
q - Question of interest.aList - List of components (i.e., valid answer(s) to the input question) .SurveyExceptionpublic Question getNextQuestion() throws SurveyException
SurveyExceptionpublic boolean terminated()
public static Map<Boolean,List<Block>> partitionBlocks(Survey survey)
survey - The survey whose top-level blocks we want to partition.Copyright © 2015. All rights reserved.