|
||||||||||
| 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.InetAddressQuestion
public abstract class InetAddressQuestion
A question to which the response is an IP address.
Both IPv4 and IPv6 addresses are supported.
| Field Summary | |
|---|---|
static int |
IPv4
A constant to indicate that only IPv4 addresses should be used. |
static int |
IPv6
A constant to indicate that IPv6 addresses should be used. |
protected java.net.InetAddress |
value
The current (default or latest) response to this question. |
| Fields inherited from class com.sun.interview.Question |
|---|
interview, key, tag |
| Constructor Summary | |
|---|---|
protected |
InetAddressQuestion(Interview interview,
java.lang.String tag)
Create a question with a nominated tag. |
protected |
InetAddressQuestion(Interview interview,
java.lang.String tag,
int type)
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.net.InetAddress i1,
java.net.InetAddress i2)
Compare two network address objects for equality. |
java.net.InetAddress |
getDefaultValue()
Get the default response for this question. |
java.lang.String |
getStringValue()
Get the response to this question as a string. |
int |
getStyle()
Get the presentation style (IPv4 or IPv6) for this question. |
java.net.InetAddress[] |
getSuggestions()
Get the suggested responses to this question, or null if none. |
int |
getType()
Get the type of addresses (IPv4 or IPv6) that will be accepted by this question. |
java.net.InetAddress |
getValue()
Get the current (default or latest) response to this question. |
java.net.InetAddress |
getValueOnPath()
Verify this question is on the current path, and if it is, return the current value. |
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.net.InetAddress v)
Set the default response for this question, used by the clear method. |
protected void |
setStyle(int style)
Set the presentation style (IPv4 or IPv6) for this question. |
void |
setSuggestions(java.net.InetAddress[] newSuggestions)
Set the set of suggested responses. |
protected void |
setType(int type)
Set the type of addresses (IPv4 or IPv6) that should be accepted by this question. |
void |
setValue(java.net.InetAddress newValue)
Set the current value. |
void |
setValue(java.lang.String newValue)
Set the current value. |
| 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 |
|---|
public static final int IPv4
public static final int IPv6
protected java.net.InetAddress value
| Constructor Detail |
|---|
protected InetAddressQuestion(Interview interview,
java.lang.String tag)
interview - The interview containing this question.tag - A unique tag to identify this specific question.
protected InetAddressQuestion(Interview interview,
java.lang.String tag,
int type)
interview - The interview containing this question.tag - A unique tag to identify this specific question.type - A value to (IPv4 or IPv6) to indicate the type of
address used by the question.| Method Detail |
|---|
public int getType()
setType(int)protected void setType(int type)
type - the type of address that should be accepted by this questiongetType()public int getStyle()
setStyle(int)protected void setStyle(int style)
style - the presentation style for this questiongetStyle()public java.net.InetAddress[] getSuggestions()
setSuggestions(java.net.InetAddress[])public void setSuggestions(java.net.InetAddress[] newSuggestions)
newSuggestions - The values to be set, or null if none
java.lang.IllegalArgumentException - if any except the first of the values
in the array are nullgetSuggestions()public java.net.InetAddress getDefaultValue()
setDefaultValue(java.net.InetAddress)public void setDefaultValue(java.net.InetAddress v)
v - the default response for this question.getDefaultValue()public java.net.InetAddress getValue()
setValue(java.net.InetAddress)
public java.net.InetAddress getValueOnPath()
throws Interview.NotOnPathFault
Interview.NotOnPathFault - if this question is not on the
current pathgetValue()public java.lang.String getStringValue()
Question
getStringValue in class QuestionQuestion.setValue(String)public void setValue(java.net.InetAddress newValue)
newValue - The value to be set.getValue()public boolean isValueValid()
Question
isValueValid in class Questionpublic boolean isValueAlwaysValid()
Question
isValueAlwaysValid in class Question
public void setValue(java.lang.String newValue)
throws Interview.Fault
setValue in class QuestionnewValue - The value to be set.
Interview.Fault - (retained for compatibility; should not be thrown)getValue()public void clear()
clear in class Questionprotected void load(java.util.Map data)
load in class Questiondata - The map from which to load the value for this question.protected void save(java.util.Map data)
save in class Questiondata - The map in which to save the value for this question.
protected static boolean equal(java.net.InetAddress i1,
java.net.InetAddress i2)
i1 - The first address to be compared, or null.i2 - The other address to be compared, or null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||