Package 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:
-
Method Summary
Modifier and TypeMethodDescriptionintGet the total number of pages<T> voidSet the paged itemsvoidsetNumberOfPages(int numberOfPages) Set the total number of pages
-
Method Details
-
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
Set the paged items- Type Parameters:
T- The type of objects in the collection- Parameters:
t- The collection
-