Class DefaultTogglePrompt

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.
  • Constructor Details

    • DefaultTogglePrompt

      public DefaultTogglePrompt(String name, String message, String activeLabel, String inactiveLabel, boolean defaultValue)
  • Method Details

    • getActiveLabel

      public String getActiveLabel()
      Description copied from interface: TogglePrompt
      Get the label for the active (on) state.
      Specified by:
      getActiveLabel in interface TogglePrompt
      Returns:
      the active state label
    • getInactiveLabel

      public String getInactiveLabel()
      Description copied from interface: TogglePrompt
      Get the label for the inactive (off) state.
      Specified by:
      getInactiveLabel in interface TogglePrompt
      Returns:
      the inactive state label
    • getDefaultValue

      public boolean getDefaultValue()
      Description copied from interface: TogglePrompt
      Get the default value.
      Specified by:
      getDefaultValue in interface TogglePrompt
      Returns:
      true if the default is the active state, false for inactive