- All Superinterfaces:
Prompt
- All Known Implementing Classes:
DefaultTogglePrompt
Interface for toggle prompts.
A toggle prompt presents a binary on/off switch with labeled states
(e.g., "Yes / No", "Enable / Disable"). The user toggles with arrow keys or Tab.
-
Method Summary
Modifier and TypeMethodDescriptionGet the label for the active (on) state.booleanGet the default value.Get the label for the inactive (off) state.Methods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
Method Details
-
getActiveLabel
String getActiveLabel()Get the label for the active (on) state.- Returns:
- the active state label
-
getInactiveLabel
String getInactiveLabel()Get the label for the inactive (off) state.- Returns:
- the inactive state label
-
getDefaultValue
boolean getDefaultValue()Get the default value.- Returns:
- true if the default is the active state, false for inactive
-