Record Class SearchMultiResponse
java.lang.Object
java.lang.Record
dev.reuss.tmdb.domain.search.model.multi.SearchMultiResponse
- Record Components:
page- current result pageresults- found movies, TV shows and peopletotalPages- total available pagestotalResults- total available results
- All Implemented Interfaces:
PagedResponse<SearchMultiResult>,TmdbModel,Serializable
public record SearchMultiResponse(int page, List<SearchMultiResult> results, int totalPages, int totalResults)
extends Record
implements PagedResponse<SearchMultiResult>, TmdbModel
Paginated TMDB multi search response.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSearchMultiResponse(int page, List<SearchMultiResult> results, int totalPages, int totalResults) Creates an instance of aSearchMultiResponserecord 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
-
SearchMultiResponse
public SearchMultiResponse(int page, List<SearchMultiResult> results, int totalPages, int totalResults) Creates an instance of aSearchMultiResponserecord 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<SearchMultiResult>- Returns:
- the value of the
pagerecord component
-
results
Returns the value of theresultsrecord component.- Specified by:
resultsin interfacePagedResponse<SearchMultiResult>- Returns:
- the value of the
resultsrecord component
-
totalPages
public int totalPages()Returns the value of thetotalPagesrecord component.- Specified by:
totalPagesin interfacePagedResponse<SearchMultiResult>- Returns:
- the value of the
totalPagesrecord component
-
totalResults
public int totalResults()Returns the value of thetotalResultsrecord component.- Specified by:
totalResultsin interfacePagedResponse<SearchMultiResult>- Returns:
- the value of the
totalResultsrecord component
-