Class QuestionFormat<TOption>

  • Type Parameters:
    TOption - Option type
    All Implemented Interfaces:
    PromptFormatter

    public class QuestionFormat<TOption>
    extends Object
    implements PromptFormatter
    Prompt format for simple questions with either a free-form response or with a limited number of options
    • Constructor Detail

      • QuestionFormat

        public QuestionFormat()
        Creates a new question format with default columns
      • QuestionFormat

        public QuestionFormat​(int columns)
        Creates a new question format with the specified columns
        Parameters:
        columns - Columns
    • Method Detail

      • displayPrompt

        public <T> void displayPrompt​(Prompt<T> prompt)
        Description copied from interface: PromptFormatter
        Displays the prompt
        Specified by:
        displayPrompt in interface PromptFormatter
        Type Parameters:
        T - Option type
        Parameters:
        prompt - Prompt