Record Class ExamEditResource.Exam
java.lang.Object
java.lang.Record
ch.tocco.nice2.optional.qualification.impl.resources.ExamEditResource.Exam
- Enclosing class:
ExamEditResource
public static record ExamEditResource.Exam(@Nullable String key, int nr, String label, @Nullable BigDecimal maxPoints, @Nullable BigDecimal weight, @Nullable String date)
extends Record
-
Constructor Summary
ConstructorDescriptionExam
(@Nullable String key, int nr, String label, @Nullable BigDecimal maxPoints, @Nullable BigDecimal weight, @Nullable String date) Creates an instance of aExam
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable String
date()
Returns the value of thedate
record component.final boolean
Indicates whether some other object is "equal to" this one.static ExamEditResource.Exam
fromEntity
(Entity entity) final int
hashCode()
Returns a hash code value for this object.@Nullable String
key()
Returns the value of thekey
record component.label()
Returns the value of thelabel
record component.@Nullable BigDecimal
Returns the value of themaxPoints
record component.int
nr()
Returns the value of thenr
record component.final String
toString()
Returns a string representation of this record class.@Nullable BigDecimal
weight()
Returns the value of theweight
record component.
-
Constructor Details
-
Exam
public Exam(@Nullable @Nullable String key, int nr, String label, @Nullable @Nullable BigDecimal maxPoints, @Nullable @Nullable BigDecimal weight, @Nullable @Nullable String date) Creates an instance of aExam
record class.- Parameters:
key
- the value for thekey
record componentnr
- the value for thenr
record componentlabel
- the value for thelabel
record componentmaxPoints
- the value for themaxPoints
record componentweight
- the value for theweight
record componentdate
- the value for thedate
record component
-
-
Method Details
-
fromEntity
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
key
Returns the value of thekey
record component.- Returns:
- the value of the
key
record component
-
nr
public int nr()Returns the value of thenr
record component.- Returns:
- the value of the
nr
record component
-
label
Returns the value of thelabel
record component.- Returns:
- the value of the
label
record component
-
maxPoints
Returns the value of themaxPoints
record component.- Returns:
- the value of the
maxPoints
record component
-
weight
Returns the value of theweight
record component.- Returns:
- the value of the
weight
record component
-
date
Returns the value of thedate
record component.- Returns:
- the value of the
date
record component
-