- java.lang.Object
-
- org.jline.prompt.impl.DefaultPrompt
-
- org.jline.prompt.impl.DefaultTogglePrompt
-
- All Implemented Interfaces:
Prompt,TogglePrompt
public class DefaultTogglePrompt extends DefaultPrompt implements TogglePrompt
Default implementation of TogglePrompt.
-
-
Field Summary
-
Fields inherited from class org.jline.prompt.impl.DefaultPrompt
message, name
-
-
Constructor Summary
Constructors Constructor Description DefaultTogglePrompt(java.lang.String name, java.lang.String message, java.lang.String activeLabel, java.lang.String inactiveLabel, boolean defaultValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetActiveLabel()Get the label for the active (on) state.booleangetDefaultValue()Get the default value.java.lang.StringgetInactiveLabel()Get the label for the inactive (off) state.-
Methods inherited from class org.jline.prompt.impl.DefaultPrompt
getFilter, getMessage, getName, getTransformer, setFilter, setTransformer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
-
-
-
Method Detail
-
getActiveLabel
public java.lang.String getActiveLabel()
Description copied from interface:TogglePromptGet the label for the active (on) state.- Specified by:
getActiveLabelin interfaceTogglePrompt- Returns:
- the active state label
-
getInactiveLabel
public java.lang.String 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
-
-