Record Class DiscoverTvShowResponse
java.lang.Object
java.lang.Record
dev.reuss.tmdb.domain.discover.model.DiscoverTvShowResponse
- Record Components:
page- current result pageresults- discovered TV showstotalPages- total available pagestotalResults- total available results
- All Implemented Interfaces:
PagedResponse<DiscoverTvShow>,TmdbModel,Serializable
public record DiscoverTvShowResponse(int page, List<DiscoverTvShow> results, int totalPages, int totalResults)
extends Record
implements PagedResponse<DiscoverTvShow>, TmdbModel
Paginated TMDB TV discover response.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDiscoverTvShowResponse(int page, List<DiscoverTvShow> results, int totalPages, int totalResults) Creates an instance of aDiscoverTvShowResponserecord 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.intpage()Returns the value of thepagerecord component.results()Returns the value of theresultsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalPagesrecord component.intReturns the value of thetotalResultsrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.reuss.tmdb.common.page.PagedResponse
hasNextPage, hasPreviousPage, hasResults, isEmpty, isFirstPage, isLastPage, nextPage, nextPageNumber, previousPage, previousPageNumber, resultCount
-
Constructor Details
-
DiscoverTvShowResponse
public DiscoverTvShowResponse(int page, List<DiscoverTvShow> results, int totalPages, int totalResults) Creates an instance of aDiscoverTvShowResponserecord class.- Parameters:
page- the value for thepagerecord componentresults- the value for theresultsrecord componenttotalPages- the value for thetotalPagesrecord componenttotalResults- the value for thetotalResultsrecord 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 '=='. -
page
public int page()Returns the value of thepagerecord component.- Specified by:
pagein interfacePagedResponse<DiscoverTvShow>- Returns:
- the value of the
pagerecord component
-
results
Returns the value of theresultsrecord component.- Specified by:
resultsin interfacePagedResponse<DiscoverTvShow>- Returns:
- the value of the
resultsrecord component
-
totalPages
public int totalPages()Returns the value of thetotalPagesrecord component.- Specified by:
totalPagesin interfacePagedResponse<DiscoverTvShow>- Returns:
- the value of the
totalPagesrecord component
-
totalResults
public int totalResults()Returns the value of thetotalResultsrecord component.- Specified by:
totalResultsin interfacePagedResponse<DiscoverTvShow>- Returns:
- the value of the
totalResultsrecord component
-