Record Class LeaderboardService.LeaderboardEntry
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.leaderboard.LeaderboardService.LeaderboardEntry
- Enclosing interface:
LeaderboardService
-
Constructor Summary
ConstructorsConstructorDescriptionLeaderboardEntry(int rank, @NotNull UUID playerId, @Nullable String playerName, double value) Creates an instance of aLeaderboardEntryrecord 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.@NotNull UUIDplayerId()Returns the value of theplayerIdrecord component.@Nullable StringReturns the value of theplayerNamerecord component.intrank()Returns the value of therankrecord component.final StringtoString()Returns a string representation of this record class.doublevalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
LeaderboardEntry
public LeaderboardEntry(int rank, @NotNull @NotNull UUID playerId, @Nullable @Nullable String playerName, double value) Creates an instance of aLeaderboardEntryrecord class.- Parameters:
rank- the value for therankrecord componentplayerId- the value for theplayerIdrecord componentplayerName- the value for theplayerNamerecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
rank
public int rank()Returns the value of therankrecord component.- Returns:
- the value of the
rankrecord component
-
playerId
Returns the value of theplayerIdrecord component.- Returns:
- the value of the
playerIdrecord component
-
playerName
Returns the value of theplayerNamerecord component.- Returns:
- the value of the
playerNamerecord component
-
value
public double value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-