Record Class CourseProgressResponse
java.lang.Object
java.lang.Record
com.nicholasalfonso.lato.dto.response.CourseProgressResponse
- Record Components:
completedAssignments- number of completed, non-archived assignmentstotalAssignments- total number of non-archived assignments in the course
Completion progress for a single course.
-
Constructor Summary
ConstructorsConstructorDescriptionCourseProgressResponse(int completedAssignments, int totalAssignments) Creates an instance of aCourseProgressResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecompletedAssignmentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalAssignmentsrecord component.
-
Constructor Details
-
CourseProgressResponse
public CourseProgressResponse(int completedAssignments, int totalAssignments) Creates an instance of aCourseProgressResponserecord class.- Parameters:
completedAssignments- the value for thecompletedAssignmentsrecord componenttotalAssignments- the value for thetotalAssignmentsrecord 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 with '=='. -
completedAssignments
public int completedAssignments()Returns the value of thecompletedAssignmentsrecord component.- Returns:
- the value of the
completedAssignmentsrecord component
-
totalAssignments
public int totalAssignments()Returns the value of thetotalAssignmentsrecord component.- Returns:
- the value of the
totalAssignmentsrecord component
-