java分页封装类

public class Pager
{
    public final static int PAGESIZE = 10;
    private int pageSize = PAGESIZE;
    private int totalCount;
    private int currentPage;
    private int totalPage;
    private List items = null;
    private String staticUrl;
    private int prePage = 0;
    private int nextPage = 0;

   public Pager(List list, int totalCount, int currentPage, int pageSize,
        String staticUrl)
    {
        if (!(list == null || list.isEmpty()))
        {
            this.items = list;
            this.totalCount = totalCount;
            this.pageSize = pageSize;
            this.currentPage = currentPage;
            this.staticUrl = staticUrl;
            this.setTotalPage(totalCount);
        }
    }

你可能感兴趣的:(java)