Record Class UserRating
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.UserRating
- All Implemented Interfaces:
Serializable,ApiResult
public record UserRating(int level, int rating, int currentLevelRating, int nextLevelRating)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUserRating(int level, int rating, int currentLevelRating, int nextLevelRating) Creates an instance of aUserRatingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecurrentLevelRatingrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlevel()Returns the value of thelevelrecord component.intReturns the value of thenextLevelRatingrecord component.intrating()Returns the value of theratingrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UserRating
public UserRating(int level, int rating, int currentLevelRating, int nextLevelRating) Creates an instance of aUserRatingrecord class.- Parameters:
level- the value for thelevelrecord componentrating- the value for theratingrecord componentcurrentLevelRating- the value for thecurrentLevelRatingrecord componentnextLevelRating- the value for thenextLevelRatingrecord 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. All components in this record class are compared with '=='. -
level
public int level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
rating
public int rating()Returns the value of theratingrecord component.- Returns:
- the value of the
ratingrecord component
-
currentLevelRating
public int currentLevelRating()Returns the value of thecurrentLevelRatingrecord component.- Returns:
- the value of the
currentLevelRatingrecord component
-
nextLevelRating
public int nextLevelRating()Returns the value of thenextLevelRatingrecord component.- Returns:
- the value of the
nextLevelRatingrecord component
-