Interface AnswerProcessor

    • Method Summary

      Modifier and Type Method Description
      default AnswerProcessor combine​(AnswerProcessor processor)
      Combine the current processor with another one.
      default Answer process​(java.lang.String str)
      Wrap the string into an Answer object and process it.
      Answer process​(Answer answer)
      Modify the entry and store the result in a new Answer object.
    • Method Detail

      • process

        Answer process​(Answer answer)
        Modify the entry and store the result in a new Answer object.
        Parameters:
        answer - the given entry
        Returns:
        a new Answer object storing the computed result
      • process

        default Answer process​(java.lang.String str)
        Wrap the string into an Answer object and process it.
        Parameters:
        str - the given string
        Returns:
        a new Answer object storing the computed result
        See Also:
        process(Answer)
      • combine

        default AnswerProcessor combine​(AnswerProcessor processor)
        Combine the current processor with another one.
        Example: a.combine(b) will result in a processor that first processes through b, then through a
        Parameters:
        processor - the other processor to combine with the current one
        Returns:
        a new processor that corresponds to function composition of this and processor