|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.interview.Question
com.sun.interview.StringListQuestion
public abstract class StringListQuestion
A question
to which the response is an array of strings.
Field Summary | |
---|---|
protected java.lang.String[] |
value
The current response for this question. |
Fields inherited from class com.sun.interview.Question |
---|
interview, key, tag |
Constructor Summary | |
---|---|
protected |
StringListQuestion(Interview interview,
java.lang.String tag)
Create a question with a nominated tag. |
Method Summary | |
---|---|
void |
clear()
Clear any response to this question, resetting the value back to its initial state. |
protected static boolean |
equal(java.lang.String[] s1,
java.lang.String[] s2)
Compare two string arrays for equality. |
protected static boolean |
equal(java.lang.String s1,
java.lang.String s2)
Compare two strings for equality. |
java.lang.String[] |
getDefaultValue()
Get the default response for this question. |
java.lang.String |
getStringValue()
Get the response to this question as a string. |
java.lang.String[] |
getValue()
Get the current (default or latest) response to this question. |
java.lang.String[] |
getValueOnPath()
Verify this question is on the current path, and if it is, return the current value. |
boolean |
isDuplicatesAllowed()
Check whether or not duplicates should be allowed in the list. |
boolean |
isValueAlwaysValid()
Check if the question always has a valid response. |
boolean |
isValueValid()
Check if the question currently has a valid response. |
protected void |
load(java.util.Map data)
Load the value for this question from a dictionary, using the tag as the key. |
protected void |
save(java.util.Map data)
Save the value for this question in a dictionary, using the tag as the key. |
void |
setDefaultValue(java.lang.String[] v)
Set the default response for this question, used by the clear method. |
void |
setDuplicatesAllowed(boolean b)
Specify whether or not duplicates should be allowed in the list. |
void |
setValue(java.lang.String s)
Set the response to this question to the value represented by a string-valued argument. |
void |
setValue(java.lang.String[] newValue)
Set the current value. |
protected static java.lang.String[] |
split(java.lang.String s)
Split a string into a set of newline-separated strings. |
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, setImage, setImage, setSummary, setText |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String[] value
Constructor Detail |
---|
protected StringListQuestion(Interview interview, java.lang.String tag)
interview
- The interview containing this question.tag
- A unique tag to identify this specific question.Method Detail |
---|
public java.lang.String[] getDefaultValue()
setDefaultValue(java.lang.String[])
,
clear()
public void setDefaultValue(java.lang.String[] v)
v
- the default response for this question.getDefaultValue()
,
clear()
public void setDuplicatesAllowed(boolean b)
b
- true if duplicates should be allowed, and false otherwiseisDuplicatesAllowed()
public boolean isDuplicatesAllowed()
setDuplicatesAllowed(boolean)
public java.lang.String[] getValue()
setValue(java.lang.String)
public java.lang.String[] getValueOnPath() throws Interview.NotOnPathFault
Interview.NotOnPathFault
- if this question is not on the
current pathgetValue()
public java.lang.String getStringValue()
getStringValue
in class Question
setValue(String)
public boolean isValueValid()
Question
isValueValid
in class Question
public boolean isValueAlwaysValid()
Question
isValueAlwaysValid
in class Question
public void setValue(java.lang.String s)
Question
setValue
in class Question
s
- A string containing a value value appropriate for the
particular type of question whose value is being set.Question.getStringValue()
public void setValue(java.lang.String[] newValue)
newValue
- The value to be set.getValue()
public void clear()
clear
in class Question
protected void load(java.util.Map data)
load
in class Question
data
- The map from which to load the value for this question.protected void save(java.util.Map data)
save
in class Question
data
- The map in which to save the value for this question.protected static boolean equal(java.lang.String[] s1, java.lang.String[] s2)
s1
- the first array to be compared, or nulls2
- the other array to be compared, or null
equal(String, String)
protected static boolean equal(java.lang.String s1, java.lang.String s2)
s1
- the first string to be compared, or nulls2
- the other string to be compared, or null
protected static java.lang.String[] split(java.lang.String s)
s
- The string to be split, or null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |