Package de.umass.lastfm
Class PaginatedResult<T>
java.lang.Object
de.umass.lastfm.PaginatedResult<T>
A
PaginatedResult
is returned by methods which result set might be so large that it needs
to be paginated. Each PaginatedResult
contains the total number of result pages, the current
page and a Collection
of entries for the current page.- Author:
- Janni Kovacs
-
Method Summary
Modifier and TypeMethodDescriptionint
getPage()
Returns the page number of this result.Returns a list of entries of the typeT
for this page.int
Returns the total number of pages available.boolean
isEmpty()
Returnstrue
if this Result contains no elements, which is the case for service calls that would have returned aPaginatedResult
but fail.
-
Method Details
-
getPage
public int getPage()Returns the page number of this result.- Returns:
- page number
-
getPageResults
Returns a list of entries of the typeT
for this page.- Returns:
- page results
-
getTotalPages
public int getTotalPages()Returns the total number of pages available.- Returns:
- total pages
-
isEmpty
public boolean isEmpty()Returnstrue
if this Result contains no elements, which is the case for service calls that would have returned aPaginatedResult
but fail.- Returns:
true
if this result contains no elements
-