Package com.nicholasalfonso.lato.service
Record Class DashboardService.DashboardData
java.lang.Object
java.lang.Record
com.nicholasalfonso.lato.service.DashboardService.DashboardData
- Record Components:
upcomingAssignments- upcoming incomplete assignmentssemesterProgressPercentage- overall completion percentageassignmentsByDueDate- upcoming assignments grouped by due datestatistics- dashboard statistics summary
- Enclosing class:
DashboardService
public static record DashboardService.DashboardData(List<AssignmentResponse> upcomingAssignments, double semesterProgressPercentage, Map<LocalDate,List<AssignmentResponse>> assignmentsByDueDate, DashboardService.DashboardStatistics statistics)
extends Record
Aggregated dashboard payload for the home view.
-
Constructor Summary
ConstructorsConstructorDescriptionDashboardData(List<AssignmentResponse> upcomingAssignments, double semesterProgressPercentage, Map<LocalDate, List<AssignmentResponse>> assignmentsByDueDate, DashboardService.DashboardStatistics statistics) Creates an instance of aDashboardDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassignmentsByDueDaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thesemesterProgressPercentagerecord component.Returns the value of thestatisticsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupcomingAssignmentsrecord component.
-
Constructor Details
-
DashboardData
public DashboardData(List<AssignmentResponse> upcomingAssignments, double semesterProgressPercentage, Map<LocalDate, List<AssignmentResponse>> assignmentsByDueDate, DashboardService.DashboardStatistics statistics) Creates an instance of aDashboardDatarecord class.- Parameters:
upcomingAssignments- the value for theupcomingAssignmentsrecord componentsemesterProgressPercentage- the value for thesemesterProgressPercentagerecord componentassignmentsByDueDate- the value for theassignmentsByDueDaterecord componentstatistics- the value for thestatisticsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
upcomingAssignments
Returns the value of theupcomingAssignmentsrecord component.- Returns:
- the value of the
upcomingAssignmentsrecord component
-
semesterProgressPercentage
public double semesterProgressPercentage()Returns the value of thesemesterProgressPercentagerecord component.- Returns:
- the value of the
semesterProgressPercentagerecord component
-
assignmentsByDueDate
Returns the value of theassignmentsByDueDaterecord component.- Returns:
- the value of the
assignmentsByDueDaterecord component
-
statistics
Returns the value of thestatisticsrecord component.- Returns:
- the value of the
statisticsrecord component
-