org.jsurveylib.model.question
Class FreeTextQuestion

java.lang.Object
  extended by org.jsurveylib.model.question.Question
      extended by org.jsurveylib.model.question.FreeTextQuestion
All Implemented Interfaces:
Template, SurveyElement, Visitable
Direct Known Subclasses:
FileChooserQuestion, TextAreaQuestion, TextFieldQuestion

public abstract class FreeTextQuestion
extends Question

FOR INTERNAL USE ONLY.


Method Summary
 java.lang.String getAnswer()
          The answer of this question.
 boolean isAnswered()
          Return true if an answer has been set for this question
 void setAnswer(java.lang.String value)
          Sets the answer of this question.
 
Methods inherited from class org.jsurveylib.model.question.Question
addAnswerListener, addEnableListener, addValidationListener, addVisibilityListener, fireAnswerChanged, fireAnswerChanged, getCurrentValidationMessage, getId, getLabel, getOnAnswerChanged, isAnswerable, isEnabled, isMandatory, isValid, isVisible, populateTemplate, removeAnswerListener, removeEnableListener, removeValidationListener, removeVisibilityListener, setEnabled, setLabel, setLabel, setMandatory, setOnAnswerChanged, setValid, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jsurveylib.model.Visitable
accept
 

Method Detail

isAnswered

public boolean isAnswered()
Return true if an answer has been set for this question

Specified by:
isAnswered in class Question

setAnswer

public void setAnswer(java.lang.String value)
Description copied from class: Question
Sets the answer of this question. If null is passed in, getAnswer() should return "" instead of null.

Specified by:
setAnswer in class Question
Parameters:
value - The answer or "" if there is no answer. This should never return null.

getAnswer

public java.lang.String getAnswer()
Description copied from class: Question
The answer of this question. This should never return null, it should return "" instead.

Specified by:
getAnswer in class Question
Returns:
The answer to the question or "" if there is no answer.