Package at.jku.dke.etutor.task_app.dto
Record Class TaskModificationResponseDto
java.lang.Object
java.lang.Record
at.jku.dke.etutor.task_app.dto.TaskModificationResponseDto
- Record Components:
descriptionDe
- The german description to set (might benull
).descriptionEn
- The english description to set (might benull
).difficulty
- The difficulty to set (might benull
).maxPoints
- The maximum points to set (might benull
).
public record TaskModificationResponseDto(String descriptionDe, String descriptionEn, @Min(0L) @Max(3L) Short difficulty, @Positive BigDecimal maxPoints)
extends Record
Response data for task creation/modification.
-
Constructor Summary
ConstructorsConstructorDescriptionTaskModificationResponseDto
(short difficulty) Creates a new instance of classTaskModificationResponseDto
.TaskModificationResponseDto
(String descriptionDe, String descriptionEn) Creates a new instance of classTaskGroupModificationResponseDto
.TaskModificationResponseDto
(String descriptionDe, String descriptionEn, @Min(0L) @Max(3L) Short difficulty, @Positive BigDecimal maxPoints) Creates an instance of aTaskModificationResponseDto
record class.TaskModificationResponseDto
(BigDecimal maxPoints) Creates a new instance of classTaskModificationResponseDto
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionDe
record component.Returns the value of thedescriptionEn
record component.Returns the value of thedifficulty
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themaxPoints
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TaskModificationResponseDto
Creates a new instance of classTaskGroupModificationResponseDto
.- Parameters:
descriptionDe
- The german description.descriptionEn
- The english description.
-
TaskModificationResponseDto
public TaskModificationResponseDto(short difficulty) Creates a new instance of classTaskModificationResponseDto
.- Parameters:
difficulty
- The difficulty.
-
TaskModificationResponseDto
Creates a new instance of classTaskModificationResponseDto
.- Parameters:
maxPoints
- The maximum points.
-
TaskModificationResponseDto
public TaskModificationResponseDto(String descriptionDe, String descriptionEn, @Min(0L) @Max(3L) @Min(0L) @Max(3L) Short difficulty, @Positive @Positive BigDecimal maxPoints) Creates an instance of aTaskModificationResponseDto
record class.- Parameters:
descriptionDe
- the value for thedescriptionDe
record componentdescriptionEn
- the value for thedescriptionEn
record componentdifficulty
- the value for thedifficulty
record componentmaxPoints
- the value for themaxPoints
record 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 withObjects::equals(Object,Object)
. -
descriptionDe
Returns the value of thedescriptionDe
record component.- Returns:
- the value of the
descriptionDe
record component
-
descriptionEn
Returns the value of thedescriptionEn
record component.- Returns:
- the value of the
descriptionEn
record component
-
difficulty
Returns the value of thedifficulty
record component.- Returns:
- the value of the
difficulty
record component
-
maxPoints
Returns the value of themaxPoints
record component.- Returns:
- the value of the
maxPoints
record component
-