java.lang.Object
org.jline.prompt.impl.DefaultPrompt
org.jline.prompt.impl.DefaultTogglePrompt
- All Implemented Interfaces:
Prompt,TogglePrompt
Default implementation of TogglePrompt.
-
Field Summary
Fields inherited from class org.jline.prompt.impl.DefaultPrompt
message, name -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTogglePrompt(String name, String message, String activeLabel, String inactiveLabel, boolean defaultValue) -
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 class org.jline.prompt.impl.DefaultPrompt
getFilter, getMessage, getName, getTransformer, setFilter, setTransformerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
Constructor Details
-
DefaultTogglePrompt
-
-
Method Details
-
getActiveLabel
Description copied from interface:TogglePromptGet the label for the active (on) state.- Specified by:
getActiveLabelin interfaceTogglePrompt- Returns:
- the active state label
-
getInactiveLabel
Description copied from interface:TogglePromptGet the label for the inactive (off) state.- Specified by:
getInactiveLabelin interfaceTogglePrompt- Returns:
- the inactive state label
-
getDefaultValue
public boolean getDefaultValue()Description copied from interface:TogglePromptGet the default value.- Specified by:
getDefaultValuein interfaceTogglePrompt- Returns:
- true if the default is the active state, false for inactive
-