Record Class UserModel
java.lang.Object
java.lang.Record
fr.multimc.api.commons.data.sources.rest.models.UserModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intgroupId()Returns the value of thegroupIdrecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.@Nullable StringteamCode()Returns the value of theteamCoderecord component.final StringtoString()Returns a string representation of this record class.@NotNull Stringusername()Returns the value of theusernamerecord component.
-
Constructor Details
-
UserModel
-
UserModel
-
UserModel
public UserModel(int id, @NotNull @NotNull String username, int groupId, @Nullable @Nullable String teamCode) Creates an instance of aUserModelrecord class.- Parameters:
id- the value for theidrecord componentusername- the value for theusernamerecord componentgroupId- the value for thegroupIdrecord componentteamCode- the value for theteamCoderecord 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 '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
groupId
public int groupId()Returns the value of thegroupIdrecord component.- Returns:
- the value of the
groupIdrecord component
-
teamCode
Returns the value of theteamCoderecord component.- Returns:
- the value of the
teamCoderecord component
-