Class Pagination

java.lang.Object
com.jummania.model.Pagination

public class Pagination extends Object
A class representing pagination information. This class holds details about the current page, previous page, next page, and total pages.

Created by Jummania on 8, May, 2025. Email: sharifuddinjumman@gmail.com Dhaka, Bangladesh.

  • Field Details

    • previousPage

      public Integer previousPage
    • currentPage

      public int currentPage
    • nextPage

      public Integer nextPage
    • totalPages

      public int totalPages
  • Constructor Details

    • Pagination

      public Pagination (Integer previousPage, int currentPage, Integer nextPage, int totalPages)
      Constructs a Pagination object with the specified page information.
      Parameters:
      previousPage - the previous page number, or null if there is no previous page
      currentPage - the current page number
      nextPage - the next page number, or null if there is no next page
      totalPages - the total number of pages
  • Method Details

    • toString

      public String toString()
      Returns a string representation of the Pagination object. The string contains the pagination details: previous page, current page, next page, and total pages.
      Overrides:
      toString in class Object
      Returns:
      a string representing the Pagination object