- All Superinterfaces:
BaseBuilder<ToggleBuilder>
- All Known Implementing Classes:
DefaultToggleBuilder
Builder for toggle prompts.
-
Method Summary
Modifier and TypeMethodDescriptionactiveLabel(String label) Set the label for the active (on) state.defaultValue(boolean defaultValue) Set the default value.inactiveLabel(String label) Set the label for the inactive (off) state.Methods inherited from interface org.jline.prompt.BaseBuilder
addPrompt, filter, message, name, transformer
-
Method Details
-
activeLabel
Set the label for the active (on) state.- Parameters:
label- the active state label (default: "Yes")- Returns:
- this builder
-
inactiveLabel
Set the label for the inactive (off) state.- Parameters:
label- the inactive state label (default: "No")- Returns:
- this builder
-
defaultValue
Set the default value.- Parameters:
defaultValue- true for active, false for inactive (default: false)- Returns:
- this builder
-