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
ConstructorsConstructorDescriptionExam(@Nullable String key, int nr, String label, @Nullable BigDecimal maxPoints, @Nullable BigDecimal weight, @Nullable String date) Creates an instance of aExamrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringdate()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.static ExamEditResource.ExamfromEntity(Entity entity) final inthashCode()Returns a hash code value for this object.@Nullable Stringkey()Returns the value of thekeyrecord component.label()Returns the value of thelabelrecord component.@Nullable BigDecimalReturns the value of themaxPointsrecord component.intnr()Returns the value of thenrrecord component.final StringtoString()Returns a string representation of this record class.@Nullable BigDecimalweight()Returns the value of theweightrecord 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 aExamrecord class.- Parameters:
key- the value for thekeyrecord componentnr- the value for thenrrecord componentlabel- the value for thelabelrecord componentmaxPoints- the value for themaxPointsrecord componentweight- the value for theweightrecord componentdate- the value for thedaterecord 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 thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
nr
public int nr()Returns the value of thenrrecord component.- Returns:
- the value of the
nrrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
maxPoints
Returns the value of themaxPointsrecord component.- Returns:
- the value of the
maxPointsrecord component
-
weight
Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-