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, long missCount) 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.longReturns the value of themissCountrecord 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 componentmissCount- the value for themissCountrecord 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
-
missCount
public long missCount()Returns the value of themissCountrecord component.- Returns:
- the value of the
missCountrecord component
-