Class ChatMessage

java.lang.Object
it.polimi.ingsw.am13.client.chat.ChatMessage

public class ChatMessage extends Object
A single chat message, as it is stored on the client. The receivers are not stored explicitly in the message because of the ChatMessage are used in Chat.
  • Field Details

    • text

      private final String text
      The text (content) of the message
    • sender

      private final PlayerLobby sender
      The sender of the message
  • Constructor Details

    • ChatMessage

      public ChatMessage(PlayerLobby sender, String text)
      Sets the attributes to the corresponding parameter
      Parameters:
      sender - of the message
      text - of the message
  • Method Details

    • getText

      public String getText()
      Returns:
      the text of the message
    • getSender

      public PlayerLobby getSender()
      Returns:
      the sender of the message