Class PaginationState

java.lang.Object
net.createmod.catnip.layout.PaginationState

public final class PaginationState extends Object
  • 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

      public void iterateForCurrentPage(BiConsumer<Integer,Integer> consumer)
      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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object