Package com.sun.interview
Class YesNoQuestion
- java.lang.Object
-
- com.sun.interview.Question
-
- com.sun.interview.ChoiceQuestion
-
- com.sun.interview.YesNoQuestion
-
public abstract class YesNoQuestion extends ChoiceQuestion
Aquestion
to which the response is yes or no.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NO
A value for a negative response.static java.lang.String
YES
A value for an affirmative response.-
Fields inherited from class com.sun.interview.ChoiceQuestion
value
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
YesNoQuestion(Interview interview, java.lang.String tag)
Create a question with a nominated tag.protected
YesNoQuestion(Interview interview, java.lang.String tag, java.lang.String defaultValue)
Create a question with a nominated tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
setChoices(java.lang.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, load, 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, reload, removeMarker, setHelpID, setImage, setImage, setSummary, setText
-
-
-
-
Field Detail
-
YES
public static final java.lang.String YES
A value for an affirmative response.- See Also:
- Constant Field Values
-
NO
public static final java.lang.String NO
A value for a negative response.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
YesNoQuestion
protected YesNoQuestion(Interview interview, java.lang.String tag)
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
protected YesNoQuestion(Interview interview, java.lang.String tag, java.lang.String defaultValue)
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 Detail
-
setChoices
protected final void setChoices(java.lang.String[] choices)
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:
java.lang.IllegalArgumentException
- always.- See Also:
ChoiceQuestion.getChoices()
,ChoiceQuestion.setChoices(String[], boolean)
,ChoiceQuestion.setChoices(String[], String[])
-
-