Record Class GameHighScore
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.GameHighScore
- All Implemented Interfaces:
Serializable,ApiResult
public record GameHighScore(int position, @NotNull User user, int score)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGameHighScore(int position, @NotNull User user, int score) Creates an instance of aGameHighScorerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intposition()Returns the value of thepositionrecord component.intscore()Returns the value of thescorerecord component.final StringtoString()Returns a string representation of this record class.@NotNull Useruser()Returns the value of theuserrecord component.
-
Constructor Details
-
GameHighScore
Creates an instance of aGameHighScorerecord class.- Parameters:
position- the value for thepositionrecord componentuser- the value for theuserrecord componentscore- the value for thescorerecord 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 '=='. -
position
public int position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
score
public int score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-