View Javadoc

1   /*
2    @See License.txt@
3    */
4   package spellcast.questions;
5   
6   import java.util.List;
7   
8   import org.apache.commons.chain.Command;
9   
10  /***
11   * The <code>IQuestion</code> interface for all questions asked of <code>IWizard</code>s.
12   * A Question is used to ask for an answer to the specified Question.
13   * The default answer is always the first answer in the list.
14   *
15   * @author Barrie Treloar
16   * @version $Revision: 1.1 $
17   */
18  public interface IQuestion extends Command {
19  
20      /***
21       * Get the value of the question.
22       *
23       * @return value of the question.
24       */
25      String getQuestion();
26  
27      /***
28       * Get the value of the answer.
29       *
30       * @return value of the answer.
31       */
32      public Object getAnswer();
33  
34  
35      /***
36       * Set the value of the answer.
37       *
38       * @param theAnswer value to assign to the answer.
39       */
40      void setAnswer(Object theAnswer);
41  
42      /***
43       * Get the all the answers.
44       *
45       * @return all the answers.
46       */
47      List<Object> getAnswers();
48  
49  }