Class Message
java.lang.Object
ai.tutor.cab302exceptionalhandlers.model.Message
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 0content
- The content of this message, must not be null or emptyfromUser
- Whether this message is from the user or the AI, true if from user, false if from AIisQuiz
- 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
- Throws:
IllegalArgumentException
-
getChatId
public int getChatId() -
getContent
-
getFromUser
public boolean getFromUser() -
getIsQuiz
public boolean getIsQuiz()
-