Record Class QuestClaim

java.lang.Object
java.lang.Record
com.cotani.quest.api.QuestClaim

public record QuestClaim(QuestClaimId claimId, UUID playerId, QuestId questId, com.cotani.reward.api.RewardId rewardId, Instant claimedAt) extends Record
Immutable successful quest claim that can be handed to the reward service.
  • Constructor Summary

    Constructors
    Constructor
    Description
    QuestClaim(QuestClaimId claimId, UUID playerId, QuestId questId, com.cotani.reward.api.RewardId rewardId, Instant claimedAt)
    Creates an instance of a QuestClaim record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the claimedAt record component.
    Returns the value of the claimId record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the playerId record component.
    Returns the value of the questId record component.
    com.cotani.reward.api.RewardClaimId
    Reuses the quest idempotency key for the corresponding reward claim.
    com.cotani.reward.api.RewardId
    Returns the value of the rewardId record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • QuestClaim

      public QuestClaim(QuestClaimId claimId, UUID playerId, QuestId questId, com.cotani.reward.api.RewardId rewardId, Instant claimedAt)
      Creates an instance of a QuestClaim record class.
      Parameters:
      claimId - the value for the claimId record component
      playerId - the value for the playerId record component
      questId - the value for the questId record component
      rewardId - the value for the rewardId record component
      claimedAt - the value for the claimedAt record component
  • Method Details

    • rewardClaimId

      public com.cotani.reward.api.RewardClaimId rewardClaimId()
      Reuses the quest idempotency key for the corresponding reward claim.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • claimId

      public QuestClaimId claimId()
      Returns the value of the claimId record component.
      Returns:
      the value of the claimId record component
    • playerId

      public UUID playerId()
      Returns the value of the playerId record component.
      Returns:
      the value of the playerId record component
    • questId

      public QuestId questId()
      Returns the value of the questId record component.
      Returns:
      the value of the questId record component
    • rewardId

      public com.cotani.reward.api.RewardId rewardId()
      Returns the value of the rewardId record component.
      Returns:
      the value of the rewardId record component
    • claimedAt

      public Instant claimedAt()
      Returns the value of the claimedAt record component.
      Returns:
      the value of the claimedAt record component