Record Class TeamModel
java.lang.Object
java.lang.Record
fr.multimc.api.commons.data.sources.rest.models.TeamModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Stringcode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull UserModel[]members()Returns the value of themembersrecord component.@NotNull Stringname()Returns the value of thenamerecord component.intownerId()Returns the value of theownerIdrecord component.intscore()Returns the value of thescorerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TeamModel
public TeamModel(@NotNull @NotNull String code, @NotNull @NotNull String name, int score, int ownerId, @NotNull @NotNull UserModel[] members) Creates an instance of aTeamModelrecord class.- Parameters:
code- the value for thecoderecord componentname- the value for thenamerecord componentscore- the value for thescorerecord componentownerId- the value for theownerIdrecord componentmembers- the value for themembersrecord component
-
-
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 '=='. -
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
score
public int score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
ownerId
public int ownerId()Returns the value of theownerIdrecord component.- Returns:
- the value of the
ownerIdrecord component
-
members
Returns the value of themembersrecord component.- Returns:
- the value of the
membersrecord component
-