de.umass.lastfm
Class PaginatedResult

java.lang.Object
  extended byde.umass.lastfm.PaginatedResult

public class PaginatedResult
extends Object

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
 int getPage()
          Returns the page number of this result.
 Collection getPageResults()
          Returns a list of entries of the type T for this page.
 int getTotalPages()
          Returns the total number of pages available.
 boolean isEmpty()
          Returns true if this Result contains no elements, which is the case for service calls that would have returned a PaginatedResult but fail.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPage

public int getPage()
Returns the page number of this result.

Returns:
page number

getPageResults

public Collection getPageResults()
Returns a list of entries of the type T for this page.

Returns:
page results

getTotalPages

public int getTotalPages()
Returns the total number of pages available.

Returns:
total pages

isEmpty

public boolean isEmpty()
Returns true if this Result contains no elements, which is the case for service calls that would have returned a PaginatedResult but fail.

Returns:
true if this result contains no elements