Package dev.postproxy.sdk.model
Record Class PaginatedResponse<T>
java.lang.Object
java.lang.Record
dev.postproxy.sdk.model.PaginatedResponse<T>
-
Constructor Summary
ConstructorsConstructorDescriptionPaginatedResponse(List<T> data, int total, int page, int perPage) Creates an instance of aPaginatedResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intpage()Returns the value of thepagerecord component.intperPage()Returns the value of theperPagerecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.
-
Constructor Details
-
PaginatedResponse
Creates an instance of aPaginatedResponserecord class.- Parameters:
data- the value for thedatarecord componenttotal- the value for thetotalrecord componentpage- the value for thepagerecord componentperPage- the value for theperPagerecord 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 '=='. -
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
total
public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
page
public int page()Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
perPage
public int perPage()Returns the value of theperPagerecord component.- Returns:
- the value of the
perPagerecord component
-