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, int responseStatus, String responseBody, long hitCount) 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 therequestPathrecord component.Returns the value of theresponseBodyrecord component.intReturns the value of theresponseStatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedEndpointDTO
-
CachedEndpointDTO
public CachedEndpointDTO(String requestPath, int responseStatus, String responseBody, long hitCount) Creates an instance of aCachedEndpointDTOrecord class.- Parameters:
requestPath- the value for therequestPathrecord componentresponseStatus- the value for theresponseStatusrecord componentresponseBody- the value for theresponseBodyrecord componenthitCount- the value for thehitCountrecord 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
-
responseStatus
public int responseStatus()Returns the value of theresponseStatusrecord component.- Returns:
- the value of the
responseStatusrecord component
-
responseBody
Returns the value of theresponseBodyrecord component.- Returns:
- the value of the
responseBodyrecord component
-
hitCount
public long hitCount()Returns the value of thehitCountrecord component.- Returns:
- the value of the
hitCountrecord component
-