Package org.eclipse.ecf.core.security
Class BooleanCallback
java.lang.Object
org.eclipse.ecf.core.security.BooleanCallback
- All Implemented Interfaces:
Serializable
,Callback
Callback that handles Boolean types
- See Also:
-
Constructor Summary
ConstructorDescriptionBooleanCallback
(String prompt) Construct aBooleanCallback
with a prompt.BooleanCallback
(String prompt, boolean defaultValue) Construct aNameCallback
with a prompt and default name. -
Method Summary
-
Constructor Details
-
BooleanCallback
Construct aBooleanCallback
with a prompt.- Parameters:
prompt
- the prompt used to request the boolean value.- Throws:
IllegalArgumentException
- ifprompt
is null or ifprompt
has a length of 0.
-
BooleanCallback
Construct aNameCallback
with a prompt and default name.- Parameters:
prompt
- the prompt used to request the information.defaultValue
- the value to be used as the default value displayed with the prompt.- Throws:
IllegalArgumentException
- ifprompt
is null.
-
-
Method Details
-
getPrompt
Get the prompt.- Returns:
- the prompt value.
-
getDefaultValue
public boolean getDefaultValue()Get the default value.- Returns:
- the default value, or null if this
BooleanCallback
was not instantiated with adefaultValue
.
-
setValue
public void setValue(boolean val) Set the retrieved name.- Parameters:
val
- the retrieved valuetrue
orfalse
.- See Also:
-
getValue
public boolean getValue()Get the retrieved value.- Returns:
- the retrieved value
true
orfalse
. - See Also:
-