Record Class RewardClaim
java.lang.Object
java.lang.Record
com.cotani.reward.api.RewardClaim
public record RewardClaim(RewardClaimId claimId, UUID playerId, RewardId rewardId, Instant claimedAt, Instant nextAvailableAt, int streak, long totalClaims, List<RewardGrant> grants)
extends Record
Immutable successful claim receipt and snapshot of the grants to settle.
-
Constructor Summary
ConstructorsConstructorDescriptionRewardClaim(RewardClaimId claimId, UUID playerId, RewardId rewardId, Instant claimedAt, Instant nextAvailableAt, int streak, long totalClaims, List<RewardGrant> grants) Creates an instance of aRewardClaimrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclaimedAtrecord component.claimId()Returns the value of theclaimIdrecord component.final booleanIndicates whether some other object is "equal to" this one.grants()Returns the value of thegrantsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thenextAvailableAtrecord component.playerId()Returns the value of theplayerIdrecord component.rewardId()Returns the value of therewardIdrecord component.intstreak()Returns the value of thestreakrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalClaimsrecord component.
-
Constructor Details
-
RewardClaim
public RewardClaim(RewardClaimId claimId, UUID playerId, RewardId rewardId, Instant claimedAt, Instant nextAvailableAt, int streak, long totalClaims, List<RewardGrant> grants) Creates an instance of aRewardClaimrecord class.- Parameters:
claimId- the value for theclaimIdrecord componentplayerId- the value for theplayerIdrecord componentrewardId- the value for therewardIdrecord componentclaimedAt- the value for theclaimedAtrecord componentnextAvailableAt- the value for thenextAvailableAtrecord componentstreak- the value for thestreakrecord componenttotalClaims- the value for thetotalClaimsrecord componentgrants- the value for thegrantsrecord 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. -
claimId
Returns the value of theclaimIdrecord component.- Returns:
- the value of the
claimIdrecord component
-
playerId
Returns the value of theplayerIdrecord component.- Returns:
- the value of the
playerIdrecord component
-
rewardId
Returns the value of therewardIdrecord component.- Returns:
- the value of the
rewardIdrecord component
-
claimedAt
Returns the value of theclaimedAtrecord component.- Returns:
- the value of the
claimedAtrecord component
-
nextAvailableAt
Returns the value of thenextAvailableAtrecord component.- Returns:
- the value of the
nextAvailableAtrecord component
-
streak
public int streak()Returns the value of thestreakrecord component.- Returns:
- the value of the
streakrecord component
-
totalClaims
public long totalClaims()Returns the value of thetotalClaimsrecord component.- Returns:
- the value of the
totalClaimsrecord component
-
grants
Returns the value of thegrantsrecord component.- Returns:
- the value of the
grantsrecord component
-