Class QuestionAnswerTypeBoolean

  • All Implemented Interfaces:
    QuestionAnswerType<java.lang.Boolean>

    public class QuestionAnswerTypeBoolean
    extends java.lang.Object
    implements QuestionAnswerType<java.lang.Boolean>
    • Constructor Detail

      • QuestionAnswerTypeBoolean

        public QuestionAnswerTypeBoolean​(java.lang.String trueString,
                                         java.lang.String falseString)
      • QuestionAnswerTypeBoolean

        public QuestionAnswerTypeBoolean()
    • Method Detail

      • getTrueString

        public java.lang.String getTrueString()
      • getFalseString

        public java.lang.String getFalseString()
      • isValidInput

        public boolean isValidInput​(@NotNull
                                    @NotNull java.lang.String input)
        Specified by:
        isValidInput in interface QuestionAnswerType<java.lang.Boolean>
      • parse

        @NotNull
        public @NotNull java.lang.Boolean parse​(@NotNull
                                                @NotNull java.lang.String input)
        Specified by:
        parse in interface QuestionAnswerType<java.lang.Boolean>
      • getPossibleAnswers

        public java.util.Collection<java.lang.String> getPossibleAnswers()
        Specified by:
        getPossibleAnswers in interface QuestionAnswerType<java.lang.Boolean>
        Returns:
        null if there are infinite possible numbers
      • getInvalidInputMessage

        public java.lang.String getInvalidInputMessage​(@NotNull
                                                       @NotNull java.lang.String input)
        Specified by:
        getInvalidInputMessage in interface QuestionAnswerType<java.lang.Boolean>