Package net.createmod.catnip.layout
Class PaginationState
java.lang.Object
net.createmod.catnip.layout.PaginationState
-
Constructor Summary
ConstructorsConstructorDescriptionPaginationState(boolean usesPagination, int elementsPerPage, int elementCount) PaginationState(boolean usesPagination, int pageIndex, int elementsPerPage, int elementCount) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintintintintintinthashCode()booleanbooleanvoiditerateForCurrentPage(BiConsumer<Integer, Integer> consumer) voidnextPage()voidtoString()boolean
-
Constructor Details
-
PaginationState
public PaginationState() -
PaginationState
public PaginationState(boolean usesPagination, int elementsPerPage, int elementCount) -
PaginationState
public PaginationState(boolean usesPagination, int pageIndex, int elementsPerPage, int elementCount)
-
-
Method Details
-
usesPagination
public boolean usesPagination() -
getPageIndex
public int getPageIndex() -
getMaxPages
public int getMaxPages() -
getElementsPerPage
public int getElementsPerPage() -
getElementCount
public int getElementCount() -
getStartIndex
public int getStartIndex() -
getCurrentPageElementCount
public int getCurrentPageElementCount() -
iterateForCurrentPage
- Parameters:
consumer- gets called once for each element of the current page. gets passed the index of the element in terms of the current page, as well as the overall element list
-
hasPreviousPage
public boolean hasPreviousPage() -
hasNextPage
public boolean hasNextPage() -
nextPage
public void nextPage() -
previousPage
public void previousPage() -
equals
-
hashCode
public int hashCode() -
toString
-