org.eclipse.ecf.core.security
Class BooleanCallback

java.lang.Object
  extended by org.eclipse.ecf.core.security.BooleanCallback
All Implemented Interfaces:
java.io.Serializable, Callback

public class BooleanCallback
extends java.lang.Object
implements Callback, java.io.Serializable

Callback that handles Boolean types

See Also:
Serialized Form

Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanCallback

public BooleanCallback(java.lang.String prompt)
Construct a BooleanCallback with a prompt.

Parameters:
prompt - the prompt used to request the boolean value.
Throws:
java.lang.IllegalArgumentException - if prompt is null or if prompt has a length of 0.

BooleanCallback

public BooleanCallback(java.lang.String prompt,
                       boolean defaultValue)
Construct a NameCallback 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:
java.lang.IllegalArgumentException - if prompt is null.
Method Detail

getPrompt

public java.lang.String 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 a defaultValue.

setValue

public void setValue(boolean val)
Set the retrieved name.

Parameters:
val - the retrieved value true or false.
See Also:
getValue()

getValue

public boolean getValue()
Get the retrieved value.

Returns:
the retrieved value true or false.
See Also:
setValue(boolean)