## net.dontdrinkandroot.lastfm.api.model.paginatedresult
Class GenericPaginatedResult<T>

    java.lang.Object
      net.dontdrinkandroot.lastfm.api.model.paginatedresult.GenericPaginatedResult<T>

Type Parameters:
  `T` - Type of the actual result.

All Implemented Interfaces:
  java.io.Serializable, PaginatedResult<T>

Direct Known Subclasses:
  AlbumsPaginatedResult, ArtistsPaginatedResult, EventsPaginatedResult, TracksPaginatedResult, UsersPaginatedResult

    public class GenericPaginatedResult<T>

extends java.lang.Object
implements PaginatedResult<T>

Default generic implementation of a `PaginatedResult`.

Author:
  Philip W. Sorst
See Also:
  Serialized Form

Constructor Summary
`GenericPaginatedResult(org.w3c.dom.Element element)` Create a paginated result from an XML `Element`.

Method Summary
`T` `getEntries()` Get the entries of the current page.
`int` `getNextPage()` Get the number of the next page.
`int` `getPage()` Get the number of the current page.
`int` `getPerPage()` Get the number of entries per page.
`int` `getTotal()` Get the number of total results.
`int` `getTotalPages()` Get the number of total pages.
`boolean` `hasMorePages()` Check if the paginated result has more pages.
`void` `setEntries(T entries)`
`void` `setPage(int page)`
`void` `setPerPage(int perPage)`
`void` `setTotal(int total)`
`void` `setTotalPages(int totalPages)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GenericPaginatedResult

    public GenericPaginatedResult(org.w3c.dom.Element element)

  Create a paginated result from an XML `Element`.

  Parameters:
    `element` - The element to convert.

Method Detail

### getEntries

    public final T getEntries()

  Description copied from interface: `PaginatedResult`
  Get the entries of the current page.

  Specified by:
    `getEntries` in interface `PaginatedResult<T>`

### setEntries

    public final void setEntries(T entries)

### hasMorePages

    public final boolean hasMorePages()

  Description copied from interface: `PaginatedResult`
  Check if the paginated result has more pages.

  Specified by:
    `hasMorePages` in interface `PaginatedResult<T>`

### getNextPage

    public final int getNextPage()

  Description copied from interface: `PaginatedResult`
  Get the number of the next page.

  Specified by:
    `getNextPage` in interface `PaginatedResult<T>`

### getTotal

    public final int getTotal()

  Description copied from interface: `PaginatedResult`
  Get the number of total results.

  Specified by:
    `getTotal` in interface `PaginatedResult<T>`

### setTotal

    public final void setTotal(int total)

### getPage

    public final int getPage()

  Description copied from interface: `PaginatedResult`
  Get the number of the current page.

  Specified by:
    `getPage` in interface `PaginatedResult<T>`

### setPage

    public final void setPage(int page)

### getPerPage

    public final int getPerPage()

  Description copied from interface: `PaginatedResult`
  Get the number of entries per page.

  Specified by:
    `getPerPage` in interface `PaginatedResult<T>`

### setPerPage

    public final void setPerPage(int perPage)

### getTotalPages

    public final int getTotalPages()

  Description copied from interface: `PaginatedResult`
  Get the number of total pages.

  Specified by:
    `getTotalPages` in interface `PaginatedResult<T>`

### setTotalPages

    public final void setTotalPages(int totalPages)

Copyright © 2012. All Rights Reserved.