zoukankan      html  css  js  c++  java
  • 分页工具类

    package com.java.activiti.util;
    import java.util.List;
    
    
    /*
     * 分页工具类
     */
    public class PageInfo<T> {
        public Integer pageSize = 5;
        private Integer count;// 总记录数
        private List<T> pageList;// 当前页的记录集合
        private Integer pageIndex;// 当前页号
        private Integer totalPages;// 总页数
    
        public Integer getPageSize() {
            return pageSize;
        }
    
        public void setPageSize(Integer pageSize) {
            this.pageSize = pageSize;
        }
    
        public Integer getCount() {
            return count;
        }
    
    
        public void setCount(Integer count) {
            this.count = count;
        }
    
        public List<T> getPageList() {
            return pageList;
        }
    
        public void setPageList(List<T> pageList) {
            this.pageList = pageList;
        }
    
        public Integer getPageIndex() {
            return pageIndex;
        }
    
        public void setPageIndex(Integer pageIndex) {
            this.pageIndex = pageIndex;
        }
    
        public Integer getTotalPages() {
            this.totalPages = this.count / this.pageSize;
            if (this.count % this.pageSize != 0)
                this.totalPages++;
            return this.totalPages;
        }
    
    }
  • 相关阅读:
    hdu 1005(找循环节)
    hdu 1452(因子和+逆元)
    hdu 1215(因子和)
    hdu 1492(约数的个数)
    hdu 2136(质数筛选+整数分解)
    HDU 1286 找新朋友
    HDU 2136 Largest prime factor
    HDU 1722 Cake
    HDU 1713 相遇周期
    HDU 2138 How many prime numbers
  • 原文地址:https://www.cnblogs.com/minxiaofei/p/10102235.html
Copyright © 2011-2022 走看看