java.lang.Object
ai.tutor.cab302exceptionalhandlers.model.Message

public class Message extends Object
Represents a single message in a Chat
Author:
Joshua M.
See Also:
  • Constructor Details

    • Message

      public Message(int chatId, String content, boolean fromUser, boolean isQuiz) throws IllegalArgumentException
      Constructor for a Message object
      Parameters:
      chatId - The chat id that this message belongs to, must be greater than 0
      content - The content of this message, must not be null or empty
      fromUser - Whether this message is from the user or the AI, true if from user, false if from AI
      isQuiz - Whether this message is a quiz question or not
      Throws:
      IllegalArgumentException - if any of the parameters are invalid
  • Method Details

    • getId

      public int getId()
    • setId

      public void setId(int id) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • getChatId

      public int getChatId()
    • getContent

      public String getContent()
    • getFromUser

      public boolean getFromUser()
    • getIsQuiz

      public boolean getIsQuiz()