# Enum Class ConnectionResponse

java.lang.Object
java.lang.Enum<ConnectionResponse>
it.polimi.ingsw.is25am31.network.ConnectionResponse

All Implemented Interfaces:
  `Serializable`, `Comparable<ConnectionResponse>`, `Constable`

public enum ConnectionResponse extends Enum<ConnectionResponse> implements Serializable
Represents the possible responses to a connection attempt to a game. This enum defines the states or outcomes that a client can encounter during the connection process.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `FIRST_PLAYER`
  Indicates that the client is the first player of the game.
  `IN_PROGRESS`
  Indicates that the game is already in progress.
  `SET_NICKNAME`
  Indicates that the client is connected to the game and required to set a nickname.
  `WAIT_CREATION`
  Indicates that the client has to wait for the creation of a new game session.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ConnectionResponse`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static ConnectionResponse[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### FIRST_PLAYER

    public static final ConnectionResponse FIRST_PLAYER
    Indicates that the client is the first player of the game.

  - ### IN_PROGRESS

    public static final ConnectionResponse IN_PROGRESS
    Indicates that the game is already in progress.

  - ### WAIT_CREATION

    public static final ConnectionResponse WAIT_CREATION
    Indicates that the client has to wait for the creation of a new game session.

  - ### SET_NICKNAME

    public static final ConnectionResponse SET_NICKNAME
    Indicates that the client is connected to the game and required to set a nickname.

- ## Method Details

  - ### values

    public static ConnectionResponse[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static ConnectionResponse valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null