spellcast.questions
Class Question

java.lang.Object
  extended by spellcast.questions.Question
All Implemented Interfaces:
java.io.Serializable, org.apache.commons.chain.Command, IQuestion
Direct Known Subclasses:
SelectTargetQuestion

public abstract class Question
extends java.lang.Object
implements java.io.Serializable, IQuestion

Default Implementation of IQuestion.

Version:
$Revision: 1.1 $
Author:
Barrie Treloar
See Also:
Serialized Form

Constructor Summary
protected Question(java.lang.String theQuestion, java.util.List<? extends java.lang.Object> theAnswers)
           
 
Method Summary
 java.lang.Object getAnswer()
          Get the value of the answer.
 java.util.List<java.lang.Object> getAnswers()
          Get the all the answers.
 java.lang.String getQuestion()
          Get the value of the question.
 void setAnswer(java.lang.Object theAnswer)
          Set the value of the answer.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.commons.chain.Command
execute
 

Constructor Detail

Question

protected Question(java.lang.String theQuestion,
                   java.util.List<? extends java.lang.Object> theAnswers)
Method Detail

getQuestion

public final java.lang.String getQuestion()
Get the value of the question.

Specified by:
getQuestion in interface IQuestion
Returns:
value of the question.

getAnswer

public final java.lang.Object getAnswer()
Get the value of the answer.

Specified by:
getAnswer in interface IQuestion
Returns:
value of the answer.

setAnswer

public final void setAnswer(java.lang.Object theAnswer)
Set the value of the answer.

Specified by:
setAnswer in interface IQuestion
Parameters:
theAnswer - value to assign to the answer.

getAnswers

public final java.util.List<java.lang.Object> getAnswers()
Get the all the answers.

Specified by:
getAnswers in interface IQuestion
Returns:
all the answers.

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2005 Spellcast. All Rights Reserved.