Package org.eclipse.ecf.core.security

## Class BooleanCallback

- java.lang.Object
- - org.eclipse.ecf.core.security.BooleanCallback

All Implemented Interfaces:
  `Serializable`, `Callback`

    public class BooleanCallback
    extends Object
    implements Callback, Serializable

Callback that handles Boolean types

See Also:
  Serialized Form

### Constructor Summary

Constructors
`BooleanCallback​(String prompt)` Construct a `BooleanCallback` with a prompt.
`BooleanCallback​(String prompt, boolean defaultValue)` Construct a `NameCallback` with a prompt and default name.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `getDefaultValue()` Get the default value.
`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​(String prompt)

Construct a `BooleanCallback` with a prompt.

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

#### BooleanCallback

    public BooleanCallback​(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:
  `IllegalArgumentException` - if `prompt` is null.

### Method Detail

#### getPrompt

    public 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)`