Record Class CachedEndpointsController.CachedEndpointDTO
java.lang.Object
java.lang.Record
edu.ucsb.cs156.diningcachingproxy.controller.CachedEndpointsController.CachedEndpointDTO
- Enclosing class:
CachedEndpointsController
-
Constructor Summary
ConstructorsConstructorDescriptionCachedEndpointDTO(CachedResponse cachedResponse) CachedEndpointDTO(String requestPath, long hitCount, Instant lastAccessedAt) Creates an instance of aCachedEndpointDTOrecord 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.longhitCount()Returns the value of thehitCountrecord component.Returns the value of thelastAccessedAtrecord component.Returns the value of therequestPathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedEndpointDTO
-
CachedEndpointDTO
Creates an instance of aCachedEndpointDTOrecord class.- Parameters:
requestPath- the value for therequestPathrecord componenthitCount- the value for thehitCountrecord componentlastAccessedAt- the value for thelastAccessedAtrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
requestPath
Returns the value of therequestPathrecord component.- Returns:
- the value of the
requestPathrecord component
-
hitCount
public long hitCount()Returns the value of thehitCountrecord component.- Returns:
- the value of the
hitCountrecord component
-
lastAccessedAt
Returns the value of thelastAccessedAtrecord component.- Returns:
- the value of the
lastAccessedAtrecord component
-