Record Class LobbyConfig

java.lang.Object
java.lang.Record
dev.zwazel.internal.config.LobbyConfig

public record LobbyConfig(@NonNull String lobbyName, @NonNull String mapName, @NonNull String teamName, Optional<Integer> spawnPoint, boolean fillEmptySlots) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    LobbyConfig(@NonNull String lobbyName, @NonNull String mapName, @NonNull String teamName, Optional<Integer> spawnPoint, boolean fillEmptySlots)
    Creates an instance of a LobbyConfig record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the fillEmptySlots record component.
    final int
    Returns a hash code value for this object.
    @NonNull String
    Returns the value of the lobbyName record component.
    @NonNull String
    Returns the value of the mapName record component.
    Returns the value of the spawnPoint record component.
    @NonNull String
    Returns the value of the teamName record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LobbyConfig

      public LobbyConfig(@NonNull @NonNull String lobbyName, @NonNull @NonNull String mapName, @NonNull @NonNull String teamName, Optional<Integer> spawnPoint, boolean fillEmptySlots)
      Creates an instance of a LobbyConfig record class.
      Parameters:
      lobbyName - the value for the lobbyName record component
      mapName - the value for the mapName record component
      teamName - the value for the teamName record component
      spawnPoint - the value for the spawnPoint record component
      fillEmptySlots - the value for the fillEmptySlots record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • lobbyName

      @NonNull public @NonNull String lobbyName()
      Returns the value of the lobbyName record component.
      Returns:
      the value of the lobbyName record component
    • mapName

      @NonNull public @NonNull String mapName()
      Returns the value of the mapName record component.
      Returns:
      the value of the mapName record component
    • teamName

      @NonNull public @NonNull String teamName()
      Returns the value of the teamName record component.
      Returns:
      the value of the teamName record component
    • spawnPoint

      public Optional<Integer> spawnPoint()
      Returns the value of the spawnPoint record component.
      Returns:
      the value of the spawnPoint record component
    • fillEmptySlots

      public boolean fillEmptySlots()
      Returns the value of the fillEmptySlots record component.
      Returns:
      the value of the fillEmptySlots record component