Class SearchResponseSupport
java.lang.Object
org.apache.maven.search.api.support.SearchResponseSupport
- All Implemented Interfaces:
SearchResponse
A search response support class.
-
Constructor Summary
ModifierConstructorDescriptionprotected
SearchResponseSupport
(SearchRequest searchRequest, int totalHits, List<Record> page) -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the count of current hits in current "page".getPage()
Returns current "page" of results as list of records, nevernull
.Returns theSearchRequest
used for this response, nevernull
.int
Returns the total count of hits produced bySearchResponse.getSearchRequest()
.toString()
-
Constructor Details
-
SearchResponseSupport
-
-
Method Details
-
getSearchRequest
Description copied from interface:SearchResponse
Returns theSearchRequest
used for this response, nevernull
.- Specified by:
getSearchRequest
in interfaceSearchResponse
-
getTotalHits
public int getTotalHits()Description copied from interface:SearchResponse
Returns the total count of hits produced bySearchResponse.getSearchRequest()
.- Specified by:
getTotalHits
in interfaceSearchResponse
-
getCurrentHits
public int getCurrentHits()Description copied from interface:SearchResponse
Returns the count of current hits in current "page". It may be less or equal to page size ofSearchRequest.getPaging()
.- Specified by:
getCurrentHits
in interfaceSearchResponse
-
getPage
Description copied from interface:SearchResponse
Returns current "page" of results as list of records, nevernull
.- Specified by:
getPage
in interfaceSearchResponse
-
toString
-