public class BooleanCallback extends java.lang.Object implements Callback, java.io.Serializable
Constructor and Description |
---|
BooleanCallback(java.lang.String prompt)
Construct a
BooleanCallback with a prompt. |
BooleanCallback(java.lang.String prompt,
boolean defaultValue)
Construct a
NameCallback with a prompt and default name. |
Modifier and Type | Method and Description |
---|---|
boolean |
getDefaultValue()
Get the default value.
|
java.lang.String |
getPrompt()
Get the prompt.
|
boolean |
getValue()
Get the retrieved value.
|
void |
setValue(boolean val)
Set the retrieved name.
|
public BooleanCallback(java.lang.String prompt)
BooleanCallback
with a prompt.
prompt
- the prompt used to request the boolean value.java.lang.IllegalArgumentException
- if prompt
is null or if prompt
has a length of 0.public BooleanCallback(java.lang.String prompt, boolean defaultValue)
NameCallback
with a prompt and default name.
prompt
- the prompt used to request the information.
defaultValue
- the value to be used as the default value displayed with the
prompt.java.lang.IllegalArgumentException
- if prompt
is null.public java.lang.String getPrompt()
public boolean getDefaultValue()
BooleanCallback
was
not instantiated with a defaultValue
.public void setValue(boolean val)
val
- the retrieved value true
or false
.getValue()
public boolean getValue()
true
or false
.setValue(boolean)