|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttalx.games.tech.QuestionAndAnswer
Holds a list of question and possibly an answer strings.
| Constructor Summary | |
QuestionAndAnswer(java.lang.String question,
QuestionAndAnswer previous)
Creates a question with no answer. |
|
QuestionAndAnswer(java.lang.String question,
java.lang.String answer,
QuestionAndAnswer previous)
Creates a question and answer. |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
Determines if two question and answer chains are equal. |
java.lang.String |
getAnswer()
Returns the question encapsulated in this object. |
QuestionAndAnswer |
getNext()
Returns the next object in the chain. |
java.lang.String |
getQuestion()
Returns the question encapsulated in this object. |
boolean |
isAnswered()
Determines if the question is answered. |
void |
setAnswer(java.lang.String answer)
Sets the answer to this question. |
java.lang.String |
toString()
Returns the string representation of the chain. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public QuestionAndAnswer(java.lang.String question,
QuestionAndAnswer previous)
question - the question for this object.previous - the object before this one in the chain,
or null if this is the beginning of a new chain.
java.lang.NullPointerException - if question is null.
public QuestionAndAnswer(java.lang.String question,
java.lang.String answer,
QuestionAndAnswer previous)
question - the question for this object, cannot be null.answer - the answer for this object or null if this is unanswered.previous - the object before this one in the chain
or null if this is the beginning of a new chain.
java.lang.NullPointerException - if question is null.| Method Detail |
public java.lang.String getQuestion()
public java.lang.String getAnswer()
public void setAnswer(java.lang.String answer)
answer - the text of the answer, or null if the question
should be marked as unanswered.public boolean isAnswered()
public QuestionAndAnswer getNext()
public java.lang.String toString()
public boolean equals(java.lang.Object o)
|
talx x1.0.5 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.