Record Class ChallengeConfigDTO

java.lang.Object
java.lang.Record
org.ntnu.idi.idatt2106.sparesti.sparestibackend.dto.config.ChallengeConfigDTO
Record Components:
experience - Experience
motivation - Motivation
challengeTypeConfigs - List of challenge type configs
All Implemented Interfaces:
Serializable

public record ChallengeConfigDTO(@NotNull(message="Experience cannot be null") Experience experience, @NotNull(message="Motivation cannot be null") Motivation motivation, @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO> challengeTypeConfigs) extends Record implements Serializable
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChallengeConfigDTO(@NotNull(message="Experience cannot be null") Experience experience, @NotNull(message="Motivation cannot be null") Motivation motivation, @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO> challengeTypeConfigs)
    Creates an instance of a ChallengeConfigDTO record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO>
    Returns the value of the challengeTypeConfigs record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @NotNull(message="Experience cannot be null") Experience
    Returns the value of the experience record component.
    final int
    Returns a hash code value for this object.
    @NotNull(message="Motivation cannot be null") Motivation
    Returns the value of the motivation record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • ChallengeConfigDTO

      public ChallengeConfigDTO(@NotNull(message="Experience cannot be null") @NotNull(message="Experience cannot be null") Experience experience, @NotNull(message="Motivation cannot be null") @NotNull(message="Motivation cannot be null") Motivation motivation, @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO> challengeTypeConfigs)
      Creates an instance of a ChallengeConfigDTO record class.
      Parameters:
      experience - the value for the experience record component
      motivation - the value for the motivation record component
      challengeTypeConfigs - the value for the challengeTypeConfigs record component
  • Method Details

    • 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.
    • experience

      @NotNull(message="Experience cannot be null") public @NotNull(message="Experience cannot be null") Experience experience()
      Returns the value of the experience record component.
      Returns:
      the value of the experience record component
    • motivation

      @NotNull(message="Motivation cannot be null") public @NotNull(message="Motivation cannot be null") Motivation motivation()
      Returns the value of the motivation record component.
      Returns:
      the value of the motivation record component
    • challengeTypeConfigs

      @NotNull(message="Challenge type configurations cannot be null") @Size(min=1, message="At least one challenge type configuration is required") public @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO> challengeTypeConfigs()
      Returns the value of the challengeTypeConfigs record component.
      Returns:
      the value of the challengeTypeConfigs record component