Package crow.game.login.api
Record Class CharServer
java.lang.Object
java.lang.Record
crow.game.login.api.CharServer
- Record Components:
address- The ip address/port pairname- The name of the serveruserCount- The number of users in the servertype- The type of servernew_- ???
public record CharServer(InetAddressAndPort address, String name, int userCount, int type, int new_)
extends Record
The record for a character server we want to tell the login clients about.
-
Constructor Summary
ConstructorsConstructorDescriptionCharServer(InetAddressAndPort address, String name, int userCount, int type, int new_) Creates an instance of aCharServerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.intnew_()Returns the value of thenew_record component.final StringtoString()Returns a string representation of this record class.inttype()Returns the value of thetyperecord component.intReturns the value of theuserCountrecord component.
-
Constructor Details
-
CharServer
Creates an instance of aCharServerrecord class.
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
userCount
public int userCount()Returns the value of theuserCountrecord component.- Returns:
- the value of the
userCountrecord component
-
type
public int type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
new_
public int new_()Returns the value of thenew_record component.- Returns:
- the value of the
new_record component
-