Class BooleanInputReader


  • public class BooleanInputReader
    extends InputReader<java.lang.Boolean,​BooleanInputReader>
    A reader for boolean values. Allows configuring which string value should be interpreted as true and which as false.
    • Constructor Detail

      • BooleanInputReader

        public BooleanInputReader​(java.util.function.Supplier<TextTerminal<?>> textTerminalSupplier)
    • Method Detail

      • withTrueInput

        public BooleanInputReader withTrueInput​(java.lang.String trueInput)
        Configures the string value that corresponds to true.
      • withFalseInput

        public BooleanInputReader withFalseInput​(java.lang.String falseInput)
        Configures the string value that corresponds to false.
      • printPrompt

        protected void printPrompt​(java.util.List<java.lang.String> prompt,
                                   TextTerminal<?> textTerminal)
        Description copied from class: InputReader
        Displays a prompt inviting the user to enter a value.
        Overrides:
        printPrompt in class InputReader<java.lang.Boolean,​BooleanInputReader>
        Parameters:
        prompt - the list of prompt messages. May be null.
        textTerminal - the text terminal to which the messages are sent.