+ /**
+ * Information about a question to ask the user and its answer.
+ *
+ * @author niki
+ *
+ */
+ private class UserQuestion {
+ private boolean oneKeyAnswer;
+ private KeyAction action;
+ private String answer;
+
+ /**
+ * Create a new {@link UserQuestion}.
+ *
+ * @param action
+ * the action that triggered the question
+ * @param oneKeyAnswer
+ * TRUE if we expect a one-key answer
+ */
+ public UserQuestion(KeyAction action, boolean oneKeyAnswer) {
+ this.action = action;
+ this.oneKeyAnswer = oneKeyAnswer;
+ }
+
+ /**
+ * Return the {@link KeyAction} that triggered the question.
+ *
+ * @return the {@link KeyAction}
+ */
+ public KeyAction getAction() {
+ return action;
+ }
+
+ /**
+ * Check if a one-key answer is expected.
+ *
+ * @return TRUE if a one-key answer is expected
+ */
+ public boolean isOneKeyAnswer() {
+ return oneKeyAnswer;
+ }
+
+ /**
+ * Return the user answer.
+ *
+ * @return the user answer
+ */
+ public String getAnswer() {
+ return answer;
+ }
+
+ /**
+ * Set the user answer.
+ *
+ * @param answer
+ * the new answer
+ */
+ public void setAnswer(String answer) {
+ this.answer = answer;
+ }
+ }
+