Class RoomSize


  • public class RoomSize
    extends java.lang.Object
    Represent the size of a Room.
    • Constructor Summary

      Constructors 
      Constructor Description
      RoomSize​(int userCount, int spectatorCount)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getSpectatorCount()
      Get the number of Spectators
      int getTotalUsers()
      Returns the sum of Users and Spectators
      int getUserCount()
      Get the number of Users/Players in the Room
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RoomSize

        public RoomSize​(int userCount,
                        int spectatorCount)
    • Method Detail

      • getUserCount

        public int getUserCount()
        Get the number of Users/Players in the Room
        Returns:
        the number of users/players
      • getSpectatorCount

        public int getSpectatorCount()
        Get the number of Spectators
        Returns:
        the number of spectators
      • getTotalUsers

        public int getTotalUsers()
        Returns the sum of Users and Spectators
        Returns:
        the total number of users (both players and spectators) in the Room
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object