Class YesNoQuestion
java.lang.Object
com.sun.interview.Question
com.sun.interview.ChoiceQuestion
com.sun.interview.YesNoQuestion
A
question to which the response is yes or no.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA value for a negative response.static final StringA value for an affirmative response.Fields inherited from class ChoiceQuestion
value -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedYesNoQuestion(Interview interview, String tag) Create a question with a nominated tag.protectedYesNoQuestion(Interview interview, String tag, String defaultValue) Create a question with a nominated tag. -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidsetChoices(String... choices) Set the set of legal responses for this question.Methods inherited from class ChoiceQuestion
clear, getChoices, getDefaultValue, getDisplayChoices, getDisplayValue, getStringValue, getValue, getValueOnPath, isValueAlwaysValid, isValueValid, save, setChoices, setChoices, setDefaultValue, setI18NChoices, setValueMethods inherited from class Question
addMarker, equals, export, getChecklistItems, getHelpID, getImage, getInterview, getKey, getNext, getResourceString, getResourceString, getSummary, getTag, getText, getTextArgs, hashCode, hasMarker, isEnabled, isHidden, load, reload, removeMarker, setHelpID, setImage, setImage, setSummary, setText
-
Field Details
-
YES
-
NO
-
-
Constructor Details
-
YesNoQuestion
-
YesNoQuestion
Create a question with a nominated tag. If this constructor is used, the choices must be supplied separately.- Parameters:
interview- The interview containing this question.tag- A unique tag to identify this specific question.defaultValue- A default value for the question; this must be one of null, YES, or NO.
-
-
Method Details
-
setChoices
Set the set of legal responses for this question. This is not permitted, since the choices are fixed as YES and NO.- Overrides:
setChoicesin classChoiceQuestion- Parameters:
choices- The set possible responses for this question.- Throws:
IllegalArgumentException- always.- See Also:
-