org.wso2.carbon.utils
Interface Pageable


public interface Pageable

Any data set which can be paged (as page 1, page 2, page3 ...) should implement this interface. This interface is used in conjunction with DataPaginator.doPaging(int, List, Pageable)

See Also:
DataPaginator.doPaging(int, List, Pageable)

Method Summary
 int getNumberOfPages()
          Get the total number of pages
<T> void
set(List<T> t)
          Set the paged items
 void setNumberOfPages(int numberOfPages)
          Set the total number of pages
 

Method Detail

getNumberOfPages

int getNumberOfPages()
Get the total number of pages

Returns:
the total number of pages

setNumberOfPages

void setNumberOfPages(int numberOfPages)
Set the total number of pages

Parameters:
numberOfPages - The total number of pages

set

<T> void set(List<T> t)
Set the paged items

Type Parameters:
T - The type of objects in the collection
Parameters:
t - The collection


Copyright © 2014 WSO2 Inc. All rights reserved.