Package fo.nya.leaderboard
Record Class LeaderboardRow
java.lang.Object
java.lang.Record
fo.nya.leaderboard.LeaderboardRow
- Record Components:
place- place of entry in a leaderboard. Always equals or grater than 1.target- target of that entry.score- current score for entry.
Created by 0da on 08.06.2023 20:45; (ノ◕ヮ◕)ノ*:・゚✧
Immutable state of on entry in leaderboard.
Immutable state of on entry in leaderboard.
-
Constructor Summary
ConstructorsConstructorDescriptionLeaderboardRow(int place, long target, long score) Creates an instance of aLeaderboardRowrecord 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.intplace()Returns the value of theplacerecord component.longscore()Returns the value of thescorerecord component.longtarget()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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. All components in this record class are compared with '=='. -
place
public int place()Returns the value of theplacerecord component.- Returns:
- the value of the
placerecord component
-
target
public long target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
score
public long score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-