Class StatusMessage

java.lang.Object
it.polimi.ingsw.Common.StatusMessage

public class StatusMessage extends Object
Status Messages implementation, informative of game's evolution
  • Field Details

    • status

      @Expose Status status
    • message

      @Expose String message
  • Constructor Details

    • StatusMessage

      public StatusMessage(Status status, String message)
      Represents a Status Message, informative of game's evolution
      Parameters:
      status - in enumeration
      message - attachment
    • StatusMessage

      public StatusMessage(Status status)
      Parameters:
      status - in enumeration
  • Method Details

    • isValid

      public static boolean isValid(String line)
      JSON Status Message Syntax validator
      Parameters:
      line - read from the client
      Returns:
      true if valid, false otherwise
    • getStatus

      public Status getStatus()
      Returns:
      type of Status Message
    • getMessage

      public String getMessage()
      Returns:
      message attachment
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object