-
public interface Survey.AnswerDescribes the answer to a Question.
-
-
Method Summary
Modifier and Type Method Description abstract StringgetQuestionId()abstract <T> TgetResponse()static Survey.AnswermakeAnswer(@NonNull() String questionId, @NonNull() String response)Create an answer with a string value. static Survey.AnswermakeAnswer(@NonNull() String questionId, int response)Create an answer with an integer value. static Survey.AnswermakeAnswer(@NonNull() String questionId, boolean response)Create an answer with a boolean value. -
-
Method Detail
-
getQuestionId
@NonNull() abstract String getQuestionId()
-
getResponse
@NonNull() abstract <T> T getResponse()
-
makeAnswer
@NonNull() static Survey.Answer makeAnswer(@NonNull() String questionId, @NonNull() String response)
Create an answer with a string value.
- Parameters:
questionId- ID of the question to answer.response- The answer as a string.
-
makeAnswer
@NonNull() static Survey.Answer makeAnswer(@NonNull() String questionId, int response)
Create an answer with an integer value.
- Parameters:
questionId- ID of the question to answer.response- The answer as an integer.
-
makeAnswer
@NonNull() static Survey.Answer makeAnswer(@NonNull() String questionId, boolean response)
Create an answer with a boolean value.
- Parameters:
questionId- ID of the question to answer.response- The answer,{@code true}or{@code false}.
-
-
-
-