Package com.sun.interview
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 String
A value for a negative response.static final String
A value for an affirmative response.Fields inherited from class com.sun.interview.ChoiceQuestion
value
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
YesNoQuestion
(Interview interview, String tag) Create a question with a nominated tag.protected
YesNoQuestion
(Interview interview, String tag, String defaultValue) Create a question with a nominated tag. -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
setChoices
(String... choices) Set the set of legal responses for this question.Methods inherited from class com.sun.interview.ChoiceQuestion
clear, getChoices, getDefaultValue, getDisplayChoices, getDisplayValue, getStringValue, getValue, getValueOnPath, isValueAlwaysValid, isValueValid, save, setChoices, setChoices, setDefaultValue, setI18NChoices, setValue
Methods inherited from class com.sun.interview.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
A value for an affirmative response.- See Also:
-
NO
A value for a negative response.- See Also:
-
-
Constructor Details
-
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.
-
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:
setChoices
in classChoiceQuestion
- Parameters:
choices
- The set possible responses for this question.- Throws:
IllegalArgumentException
- always.- See Also:
-