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
ConstructorsConstructorDescriptionBooleanCallback(String prompt) Construct aBooleanCallbackwith a prompt.BooleanCallback(String prompt, boolean defaultValue) Construct aNameCallbackwith a prompt and default name. -
Method Summary
-
Constructor Details
-
BooleanCallback
Construct aBooleanCallbackwith a prompt.- Parameters:
prompt- the prompt used to request the boolean value.- Throws:
IllegalArgumentException- ifpromptis null or ifprompthas a length of 0.
-
BooleanCallback
Construct aNameCallbackwith 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- ifpromptis 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
BooleanCallbackwas not instantiated with adefaultValue.
-
setValue
public void setValue(boolean val) Set the retrieved name.- Parameters:
val- the retrieved valuetrueorfalse.- See Also:
-
getValue
public boolean getValue()Get the retrieved value.- Returns:
- the retrieved value
trueorfalse. - See Also:
-