Record Class StatisticsController.StatisticsSummary
java.lang.Object
java.lang.Record
edu.ucsb.cs156.dining.controllers.StatisticsController.StatisticsSummary
- Enclosing class:
StatisticsController
public static record StatisticsController.StatisticsSummary(long totalApprovedReviews, long totalMenuItemsReviewed, long totalCommonsCovered, LocalDateTime lastReviewDate)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionStatisticsSummary(long totalApprovedReviews, long totalMenuItemsReviewed, long totalCommonsCovered, LocalDateTime lastReviewDate) Creates an instance of aStatisticsSummaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelastReviewDaterecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalApprovedReviewsrecord component.longReturns the value of thetotalCommonsCoveredrecord component.longReturns the value of thetotalMenuItemsReviewedrecord component.
-
Constructor Details
-
StatisticsSummary
public StatisticsSummary(long totalApprovedReviews, long totalMenuItemsReviewed, long totalCommonsCovered, LocalDateTime lastReviewDate) Creates an instance of aStatisticsSummaryrecord class.- Parameters:
totalApprovedReviews- the value for thetotalApprovedReviewsrecord componenttotalMenuItemsReviewed- the value for thetotalMenuItemsReviewedrecord componenttotalCommonsCovered- the value for thetotalCommonsCoveredrecord componentlastReviewDate- the value for thelastReviewDaterecord 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 '=='. -
totalApprovedReviews
public long totalApprovedReviews()Returns the value of thetotalApprovedReviewsrecord component.- Returns:
- the value of the
totalApprovedReviewsrecord component
-
totalMenuItemsReviewed
public long totalMenuItemsReviewed()Returns the value of thetotalMenuItemsReviewedrecord component.- Returns:
- the value of the
totalMenuItemsReviewedrecord component
-
totalCommonsCovered
public long totalCommonsCovered()Returns the value of thetotalCommonsCoveredrecord component.- Returns:
- the value of the
totalCommonsCoveredrecord component
-
lastReviewDate
Returns the value of thelastReviewDaterecord component.- Returns:
- the value of the
lastReviewDaterecord component
-